1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Deep Learning with Keras

Connected

Exercise

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)

Instructions 1/2

undefined XP
    1
    2
  • Train your model for 60 epochs, using X_test and y_test as validation data.
  • Use plot_loss() passing loss and val_loss as extracted from the history attribute of the h_callback object.