predicting house pricesa regression example partial_train_targets np concatenate[train_targets[: num_val_samples]train_targets[( num_val_samples:]]axis= builds the keras model (already compiledmodel build_model(history model fit(partial_train_datapartial_train_targetsvalidation_data=(val_dataval_targets)epochs=num_epochsbatch_size= verbose= mae_history history history['val_mean_absolute_error'all_mae_histories append(mae_historytrains the model (in silent modeverbose you can then compute the average of the per-epoch mae scores for all folds listing building he hist ory of successive mean -fold validat ion scores average_mae_history np mean([ [ifor in all_mae_histories]for in range(num_epochs)let' plot thissee figure listing plot ing validat ion scores import matplotlib pyplot as plt plt plot(range( len(average_mae_history )average_mae_historyplt xlabel('epochs'plt ylabel('validation mae'plt show(figure validat ion mae by epoch it may be little difficult to see the plotdue to scaling issues and relatively high variance let' do the followingomit the first data pointswhich are on different scale than the rest of the curve replace each point with an exponential moving average of the previous pointsto obtain smooth curve licensed to