Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- history = model.fit(x, y, validation_split=0.25, epochs=50, batch_size=16, verbose=1)
- # Plot training & validation accuracy values
- plt.plot(history.history['acc'])
- plt.plot(history.history['val_acc'])
- plt.title('Model accuracy')
- plt.ylabel('Accuracy')
- plt.xlabel('Epoch')
- plt.legend(['Train', 'Test'], loc='upper left')
- plt.show()
- # Plot training & validation loss values
- 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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement