deepof.model_utils.CustomStopper
- class deepof.model_utils.CustomStopper(start_epoch, *args, **kwargs)
Custom early stopping callback. Prevents the model from stopping before warmup is over.
- __init__(start_epoch, *args, **kwargs)
Initialize the CustomStopper callback.
- Parameters:
start_epoch – epoch from which performance will be taken into account when deciding whether to stop training.
*args – arguments passed to the callback.
**kwargs – keyword arguments passed to the callback.
Methods
__init__
(start_epoch, *args, **kwargs)Initialize the CustomStopper callback.
get_config
()Update callback metadata.
get_monitor_value
(logs)on_batch_begin
(batch[, logs])A backwards compatibility alias for on_train_batch_begin.
on_batch_end
(batch[, logs])A backwards compatibility alias for on_train_batch_end.
on_epoch_begin
(epoch[, logs])Called at the start of an epoch.
on_epoch_end
(epoch[, logs])Check whether to stop training.
on_predict_batch_begin
(batch[, logs])Called at the beginning of a batch in predict methods.
on_predict_batch_end
(batch[, logs])Called at the end of a batch in predict methods.
on_predict_begin
([logs])Called at the beginning of prediction.
on_predict_end
([logs])Called at the end of prediction.
on_test_batch_begin
(batch[, logs])Called at the beginning of a batch in evaluate methods.
on_test_batch_end
(batch[, logs])Called at the end of a batch in evaluate methods.
on_test_begin
([logs])Called at the beginning of evaluation or validation.
on_test_end
([logs])Called at the end of evaluation or validation.
on_train_batch_begin
(batch[, logs])Called at the beginning of a training batch in fit methods.
on_train_batch_end
(batch[, logs])Called at the end of a training batch in fit methods.
on_train_begin
([logs])Called at the beginning of training.
on_train_end
([logs])Called at the end of training.
set_model
(model)set_params
(params)- __init__(start_epoch, *args, **kwargs)
Initialize the CustomStopper callback.
- Parameters:
start_epoch – epoch from which performance will be taken into account when deciding whether to stop training.
*args – arguments passed to the callback.
**kwargs – keyword arguments passed to the callback.