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

Comparing activation functions II

What you coded in the previous exercise has been executed to obtain theactivation_results variable, this time 100 epochs were used instead of 20. This way you will have more epochs to further compare how the training evolves per activation function.

For every h_callback of each activation function in activation_results:

  • The h_callback.history['val_loss'] has been extracted.
  • The h_callback.history['val_accuracy'] has been extracted.

Both are saved into two dictionaries: val_loss_per_function and val_acc_per_function.

Pandas is also loaded as pd for you to use. Let's plot some quick validation loss and accuracy charts!

Bu egzersiz

Introduction to Deep Learning with Keras

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

Egzersiz talimatları

  • Use pd.DataFrame()to create a new DataFrame from the val_loss_per_function dictionary.
  • Call plot() on the DataFrame.
  • Create another pandas DataFrame from val_acc_per_function.
  • Once again, plot the DataFrame.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a dataframe from val_loss_per_function
val_loss= ____.____(____)

# Call plot on the dataframe
____
plt.show()

# Create a dataframe from val_acc_per_function
val_acc = _____

# Call plot on the dataframe
____
plt.show()
Kodu Düzenle ve Çalıştır