Is the model overfitting?
Let's train the model
you just built and plot its learning curve to check out if it's overfitting!
You can make use of the loaded function plot_loss()
to plot training loss against validation loss, you can get both from the history callback.
If you want to inspect the plot_loss()
function code, paste this in the console: show_code(plot_loss)
Diese Übung ist Teil des Kurses
Introduction to Deep Learning with Keras
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Train your model for 60 epochs, using X_test and y_test as validation data
h_callback = model.fit(____, ____, epochs = ____, ____ = (____, ____), verbose=0)
# Extract from the h_callback object loss and val_loss to plot the learning curve
plot_loss(____.____[____], ____.____[____])