SHARE
TWEET

Untitled

a guest Jun 12th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top