1history = model.fit()
2print(history.history.keys())
3
4import matplotlib.pylab as plt
5from matplotlib.pyplot import figure
6figure(figsize=(8, 6))
7plt.plot(history.history['loss'])
8plt.plot(history.history['val_loss'])
9plt.title('model loss')
10plt.ylabel('loss')
11plt.xlabel('epoch')
12plt.legend(['train', 'test'], loc='upper left')
13plt.show()