tf.keras.callbacks.ModelCheckpoint

View source on GitHub

Save the model after every epoch.

Inherits From: Callback

tf.keras.callbacks.ModelCheckpoint(
    filepath, monitor='val_loss', verbose=0, save_best_only=False,
    save_weights_only=False, mode='auto', save_freq='epoch', **kwargs
)

filepath can contain named formatting options, which will be filled the value of epoch and keys in logs (passed in on_epoch_end).

For example: if filepath is weights.{epoch:02d}-{val_loss:.2f}.hdf5, then the model checkpoints will be saved with the epoch number and the validation loss in the filename.

Arguments:

Methods

set_model

View source

set_model(
    model
)

set_params

View source

set_params(
    params
)