Advertisement
Guest User

Untitled

a guest
Jun 12th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2.  
  3. history = model.fit(x, y, validation_split=0.25, epochs=50, batch_size=16, verbose=1)
  4.  
  5. # Plot training & validation accuracy values
  6. plt.plot(history.history['acc'])
  7. plt.plot(history.history['val_acc'])
  8. plt.title('Model accuracy')
  9. plt.ylabel('Accuracy')
  10. plt.xlabel('Epoch')
  11. plt.legend(['Train', 'Test'], loc='upper left')
  12. plt.show()
  13.  
  14. # Plot training & validation loss values
  15. plt.plot(history.history['loss'])
  16. plt.plot(history.history['val_loss'])
  17. plt.title('Model loss')
  18. plt.ylabel('Loss')
  19. plt.xlabel('Epoch')
  20. plt.legend(['Train', 'Test'], loc='upper left')
  21. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement