Skip to content

Instantly share code, notes, and snippets.

@sachinkale
Created September 9, 2020 16:30
Show Gist options
  • Save sachinkale/72a1a2831278083f3934941666a089c1 to your computer and use it in GitHub Desktop.
Save sachinkale/72a1a2831278083f3934941666a089c1 to your computer and use it in GitHub Desktop.
Visualizing training result
acc = history.history['accuracy']
val_acc = history.history['val_accuracy']
loss=history.history['loss']
val_loss=history.history['val_loss']
epochs_range = range(epochs)
plt.figure(figsize=(8, 8))
plt.subplot(1, 2, 1)
plt.plot(epochs_range, acc, label='Training Accuracy')
plt.plot(epochs_range, val_acc, label='Validation Accuracy')
plt.legend(loc='lower right')
plt.title('Training and Validation Accuracy')
plt.subplot(1, 2, 2)
plt.plot(epochs_range, loss, label='Training Loss')
plt.plot(epochs_range, val_loss, label='Validation Loss')
plt.legend(loc='upper right')
plt.title('Training and Validation Loss')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment