Created
November 22, 2021 00:58
-
-
Save vikramsoni2/1b4856bd5aebf5825b28a7fa40e28ffa to your computer and use it in GitHub Desktop.
Tensorflow plot history using matplotlib
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 | |
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