class documentation
class ModelCheckpoint(BaseCallback): (source)
Constructor: ModelCheckpoint(save_path, monitor, save_best_only, verbose, ...)
Model Checkpointing
This callback function monitors a metric and saves the instance of model to disk at every epoch or on a condition
Method | __init__ |
Initialize |
Method | run |
The callback method that will be called after each epoch |
Instance Variable | _metric |
Undocumented |
Instance Variable | _monitor |
Undocumented |
Instance Variable | _save |
Undocumented |
Instance Variable | _save |
Undocumented |
Instance Variable | _verbose |
Undocumented |
def __init__(self, save_path:
str
= 'model.ckpt', monitor: str
= 'loss', save_best_only: bool
= True, verbose: bool
= False, **kwargs):
(source)
¶
Initialize
- Args
- save_path:
- Save path for the model
- monitor:
- The metric to monitor. It is one of the 4: loss, acc, val_loss, val_acc
- save_best_only:
- whether to save only the best model according to the monitor
- verbose:
- Log callback function logs