Skip to content

Instantly share code, notes, and snippets.

@KananMahammadli
Created August 21, 2021 12:52
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 KananMahammadli/5bb5e47208ff4b8ebedbc05af3e23930 to your computer and use it in GitHub Desktop.
Save KananMahammadli/5bb5e47208ff4b8ebedbc05af3e23930 to your computer and use it in GitHub Desktop.
# summarize history for accuracy
plt.plot(history.history['accuracy'])
plt.plot(history.history['val_accuracy'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
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