Skip to content

Instantly share code, notes, and snippets.

@KananMahammadli
Created August 29, 2021 22:22
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/5032d858ebc3e9a30ca5dc84dc244a3e to your computer and use it in GitHub Desktop.
Save KananMahammadli/5032d858ebc3e9a30ca5dc84dc244a3e 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_tomato.h5')
print('Weights saved.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment