BaşlayınÜcretsiz Başlayın

Plot the learning curves

During learning, the model will store the loss function evaluated in each epoch. Looking at the learning curves can tell us quite a bit about the learning process. In this exercise, you will plot the learning and validation loss curves for a model that you will train.

Bu egzersiz

Image Modeling with Keras

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Fit the model to the training data (train_data).
  • Use a validation split of 20%, 3 epochs and batch size of 10.
  • Plot the training loss.
  • Plot the validation loss.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

import matplotlib.pyplot as plt

# Train the model and store the training object
training = ____

# Extract the history from the training object
history = training.____

# Plot the training loss 
plt.plot(history[____])
# Plot the validation loss
plt.plot(history[____])

# Show the figure
plt.show()
Kodu Düzenle ve Çalıştır