Last active
November 12, 2018 21:54
-
-
Save none53/b76dd264b3f1c22e29986182bf5f3262 to your computer and use it in GitHub Desktop.
Layout Graph
This file contains hidden or 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 = plt.figure(figsize=(10, 5)) | |
| fig.add_subplot(1, 2, 1) | |
| plt.plot(epochs, acc, 'bo', label='Training acc') | |
| plt.plot(epochs, val_acc, 'b', label='Validation acc') | |
| plt.title('Training and Validation acc') | |
| plt.legend() | |
| epochs = range(len(loss)) | |
| fig.add_subplot(1, 2, 2) | |
| plt.plot(epochs, loss, 'bo', label='Training loss') | |
| plt.plot(epochs, val_loss, 'b', label='Validation loss') | |
| plt.title('Training and Validation loss') | |
| plt.legend() | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment