Skip to content

Instantly share code, notes, and snippets.

@RITIK-12
Created September 20, 2020 15:17
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 RITIK-12/dc98c4e84fc329a22cfce4743e401f35 to your computer and use it in GitHub Desktop.
Save RITIK-12/dc98c4e84fc329a22cfce4743e401f35 to your computer and use it in GitHub Desktop.
N = EPOCHS
plt.style.use("ggplot")
plt.figure()
plt.plot(np.arange(0, N), H.history["loss"], label="train_loss")
plt.plot(np.arange(0, N), H.history["val_loss"], label="val_loss")
plt.plot(np.arange(0, N), H.history["accuracy"], label="train_acc")
plt.plot(np.arange(0, N), H.history["val_accuracy"], label="val_acc")
plt.title("Training Loss and Accuracy")
plt.xlabel("Epoch #")
plt.ylabel("Loss/Accuracy")
plt.legend(loc="lower right")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment