The history callback
The history callback is returned by default every time you train a model with the .fit() method. To access these metrics you can access the history dictionary parameter inside the returned h_callback object with the corresponding keys.
The irrigation machine model you built in the previous lesson is loaded for you to train, along with its features and labels now loaded as X_train, y_train, X_test, y_test.
This time you will store the model's historycallback and use the validation_data parameter as it trains.
You will plot the results stored in history with plot_accuracy() and plot_loss(), two simple matplotlib functions. 
You can check their code in the console by pasting show_code(plot_loss). 
Let's see the behind the scenes of our training!
Diese Übung ist Teil des Kurses
Introduction to Deep Learning with Keras
Anleitung zur Übung
- Train your model on 
X_trainandy_train, validate each epoch onX_testandy_test. - Use 
plot_lossextractinglossandval_lossfromh_callback. - Use 
plot_accuracyextractingaccuracyandval_accuracyfromh_callback. 
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Train your model and save its history
h_callback = ____.____(____, ____, epochs = 25,
               validation_data=(____, ____))
# Plot train vs test loss during training
plot_loss(h_callback.history[____], h_callback.history[____])
# Plot train vs test accuracy during training
plot_accuracy(h_callback.history[____], h_callback.history[____])