Skip to content

Instantly share code, notes, and snippets.

@DiogoDantas
Last active January 18, 2019 12:46
Show Gist options
  • Save DiogoDantas/96188e3687efcce7228817f2a7572e90 to your computer and use it in GitHub Desktop.
Save DiogoDantas/96188e3687efcce7228817f2a7572e90 to your computer and use it in GitHub Desktop.
def plot_acc_loss(history):
plt.figure(figsize=(20,6))
plt.subplot(1,2,1)
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.xlabel('Epoch')
plt.ylabel('Loss')
plt.legend(['train', 'val'], loc='best')
plt.title('Loss')
plt.subplot(1,2,2)
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.xlabel('Epoch')
plt.ylabel('Accuracy')
plt.title('Accuracy')
plt.legend(['train', 'val'], loc='best)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment