Skip to content

Instantly share code, notes, and snippets.

@lylayang
Last active March 9, 2020 05:18
Show Gist options
  • Save lylayang/a7c4d8a49b40787f7b2f7c9d77ed1282 to your computer and use it in GitHub Desktop.
Save lylayang/a7c4d8a49b40787f7b2f7c9d77ed1282 to your computer and use it in GitHub Desktop.
def model_loss(history):
plt.figure(figsize=(8,4))
plt.plot(history.history['loss'], label='Train Loss')
plt.plot(history.history['val_loss'], label='Test Loss')
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epochs')
plt.legend(loc='upper right')
plt.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment