Last active
July 2, 2021 16:54
-
-
Save VedPDubey/690e4110909cc41569b38e4c16136341 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
def show_final_history(history): | |
fig, ax = plt.subplots(1, 2, figsize=(15,5)) | |
ax[0].set_title('loss') | |
ax[0].plot(history.epoch, history.history["loss"], label="Train loss") | |
ax[0].plot(history.epoch, history.history["val_loss"], label="Validation loss") | |
ax[1].set_title('acc') | |
ax[1].plot(history.epoch, history.history["accuracy"], label="Train acc") | |
ax[1].plot(history.epoch, history.history["val_accuracy"], label="Validation acc") | |
ax[0].legend() | |
ax[1].legend() | |
show_final_history(history) | |
model.save("model.h5") | |
print("Weights Saved") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment