Public Member Functions | |
def | __init__ (self, filepath, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', period=1) |
def | on_epoch_end (self, epoch, logs=None) |
Public Attributes | |
monitor | |
verbose | |
filepath | |
save_best_only | |
save_weights_only | |
period | |
epochs_since_last_save | |
monitor_op | |
best | |
Save detached from multi-GPU encapsulation model (very small) modification from https://github.com/fchollet/keras/blob/master/keras/callbacks.py#L331 `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 filepath: string, path to save the model file. monitor: quantity to monitor. verbose: verbosity mode, 0 or 1. save_best_only: if `save_best_only=True`, the latest best model according to the quantity monitored will not be overwritten. mode: one of {auto, min, max}. If `save_best_only=True`, the decision to overwrite the current save file is made based on either the maximization or the minimization of the monitored quantity. For `val_acc`, this should be `max`, for `val_loss` this should be `min`, etc. In `auto` mode, the direction is automatically inferred from the name of the monitored quantity. save_weights_only: if True, then only the model's weights will be saved (`model.save_weights(filepath)`), else the full model is saved (`model.save(filepath)`). period: Interval (number of epochs) between checkpoints.
Definition at line 92 of file my_callbacks.py.
def my_callbacks.ModelCheckpointDetached.__init__ | ( | self, | |
filepath, | |||
monitor = 'val_loss' , |
|||
verbose = 0 , |
|||
save_best_only = False , |
|||
save_weights_only = False , |
|||
mode = 'auto' , |
|||
period = 1 |
|||
) |
Definition at line 128 of file my_callbacks.py.
def my_callbacks.ModelCheckpointDetached.on_epoch_end | ( | self, | |
epoch, | |||
logs = None |
|||
) |
Definition at line 157 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.best |
Definition at line 145 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.epochs_since_last_save |
Definition at line 136 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.filepath |
Definition at line 132 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.monitor |
Definition at line 130 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.monitor_op |
Definition at line 144 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.period |
Definition at line 135 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.save_best_only |
Definition at line 133 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.save_weights_only |
Definition at line 134 of file my_callbacks.py.
my_callbacks.ModelCheckpointDetached.verbose |
Definition at line 131 of file my_callbacks.py.