IniziaInizia gratis

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)

Questo esercizio fa parte del corso

Introduction to Deep Learning with Keras

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# 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(____.____[____], ____.____[____])
Modifica ed esegui il codice