Created
June 25, 2019 22:42
-
-
Save obeshor/711be04d5cb1e63520d12af696dc37bc to your computer and use it in GitHub Desktop.
Check performance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pylab as plt | |
import numpy as np | |
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.ylabel("Accuracy (training and validation)") | |
plt.xlabel("Training Steps") | |
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.ylabel("Loss (training and validation)") | |
plt.xlabel("Training Steps") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment