Last active
April 28, 2019 19:57
-
-
Save kukumber/0df987d76d759666325cece077f133cb to your computer and use it in GitHub Desktop.
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.pyplot as plt | |
acc = history.history['acc'] | |
val_acc = history.history['val_acc'] | |
loss = history.history['loss'] | |
val_loss = history.history['val_loss'] | |
epochs = range(len(acc)) | |
fig, (ax1, ax2) = plt.subplots(2, 1) | |
fig.set_figwidth(12) | |
fig.set_figheight(10) | |
ax1.plot(epochs, acc, 'r', label="Training Accuracy") | |
ax1.plot(epochs, val_acc, 'b', label="Validation Accuracy") | |
ax1.set_title("Training and validation accuracy") | |
ax1.legend() | |
ax1.grid() | |
ax2.plot(epochs, loss, 'r', label="Training Loss") | |
ax2.plot(epochs, val_loss, 'b', label="Validation Loss") | |
ax2.set_title("Training and validation loss") | |
ax2.legend() | |
ax2.grid() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment