xnn.common.train.callbacks.EarlyStopping#
- class xnn.common.train.callbacks.EarlyStopping(monitor=None, mode=None, patience=10, min_delta=0.0, stopping_threshold=None, check_finite=True)[source]#
Bases:
CallbackStops training when a monitored value stops improving, reaches a threshold, or is not finite.
- Parameters:
monitor (str or None, optional) – The value to monitor; defaults to the trainer’s.
mode (str or None, optional) –
"min"or"max"; defaults to the trainer’s.patience (int, optional) – Evaluations without improvement before stopping;
0disables this rule. Defaults to10.min_delta (float, optional) – The least change that counts as an improvement. Defaults to
0.0.stopping_threshold (float or None, optional) – Stop as soon as the value is better than this. Defaults to
None.check_finite (bool, optional) – Stop when the value is NaN or infinite. Defaults to
True.
- Variables: