Skip to content

Instantly share code, notes, and snippets.

@jonathanoheix
Created January 4, 2019 08:28
Show Gist options
  • Save jonathanoheix/24628bba394b107a03473af69c16b9f1 to your computer and use it in GitHub Desktop.
Save jonathanoheix/24628bba394b107a03473af69c16b9f1 to your computer and use it in GitHub Desktop.
# plot the evolution of Loss and Acuracy on the train and validation sets
import matplotlib.pyplot as plt
plt.figure(figsize=(20,10))
plt.subplot(1, 2, 1)
plt.suptitle('Optimizer : Adam', fontsize=10)
plt.ylabel('Loss', fontsize=16)
plt.plot(history.history['loss'], label='Training Loss')
plt.plot(history.history['val_loss'], label='Validation Loss')
plt.legend(loc='upper right')
plt.subplot(1, 2, 2)
plt.ylabel('Accuracy', fontsize=16)
plt.plot(history.history['acc'], label='Training Accuracy')
plt.plot(history.history['val_acc'], label='Validation Accuracy')
plt.legend(loc='lower right')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment