In Keras, we can return the output of model.fit
to a history as follows:
history = model.fit(X_train, y_train,
batch_size
The above answers are useful when saving history at the end of the training process. If you want to save the history during the training, the CSVLogger callback will be helpful.
Below code saves the model weight and history training in form of a datasheet file log.csv.
model_cb = tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_path)
history_cb = tf.keras.callbacks.CSVLogger('./log.csv', separator=",", append=False)
history = model.fit(callbacks=[model_cb, history_cb])