Get startedGet started for free

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)

This exercise is part of the course

Introduction to Deep Learning with Keras

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# 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(____.____[____], ____.____[____])
Edit and Run Code