Skip to content

Instantly share code, notes, and snippets.

@ferrygun
Created June 11, 2020 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferrygun/a222ff30b09717a4bb9725146108aafd to your computer and use it in GitHub Desktop.
Save ferrygun/a222ff30b09717a4bb9725146108aafd to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
def plot_graphs(history, string):
plt.plot(history.history[string])
plt.plot(history.history['val_'+string])
plt.xlabel("Epochs")
plt.ylabel(string)
plt.legend([string, 'val_'+string])
plt.show()
plot_graphs(history, "accuracy")
plot_graphs(history, "loss")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment