#The easiest way to save history of model
# saving
np.save('my_history.npy',history.history)
# loading
history=np.load('my_history.npy',allow_pickle='TRUE').item()
# Then history is a dictionary and you can retrieve all desirable values using the keys.
with open('/trainHistoryDict', 'wb') as file_pi:
pickle.dump(history.history, file_pi)