ModelCheckpoint#
- class pinnx.callbacks.ModelCheckpoint(filepath, verbose=0, save_better_only=False, period=1, monitor='train loss')[source]#
Save the trainer after every epoch.
- Parameters:
filepath (string) – Prefix of filenames to save the trainer file.
verbose – Verbosity mode, 0 or 1.
save_better_only – If True, only save a better trainer according to the quantity monitored. Trainer is only checked at validation step according to
display_everyinTrainer.train.period – Interval (number of epochs) between checkpoints.
monitor – The loss function that is monitored. Either ‘train loss’ or ‘test loss’.