ModelCheckpointCallback
class ModelCheckpointCallback
Callback for checkpointing summarizer models.
__init__
def __init__(file_path, summarizer, monitor, mode)
Initializes the Callback.
Args
-
file_path: Path for saving the model (a directory). If existing, the model will be overwritten.
-
summarizer: Summarizer to checkpoint.
-
monitor: Name of the score monitor for improvements.
-
mode: If set to 'min' a decrease of the monitored score is seen as an improvement, otherwise an increase.
on_epoch_end
def on_epoch_end(batch, logs)