early_stopping
EarlyStopping
¶
Bases: Trace
Stop training when a monitored quantity has stopped improving.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor |
str
|
Quantity to be monitored. |
'loss'
|
min_delta |
float
|
Minimum change in the monitored quantity to qualify as an improvement, i.e. an absolute change of less than min_delta will count as no improvement. |
0.0
|
patience |
int
|
Number of epochs with no improvement after which training will be stopped. |
0
|
compare |
str
|
One of {"min", "max"}. In "min" mode, training will stop when the quantity monitored
has stopped decreasing; in |
'min'
|
baseline |
Optional[float]
|
Baseline value for the monitored quantity. Training will stop if the model doesn't show improvement over the baseline. |
None
|
mode |
str
|
What mode(s) to execute this Trace in. For example, "train", "eval", "test", or "infer". To execute regardless of mode, pass None. To execute in all modes except for a particular one, you can pass an argument like "!infer" or "!train". |
'eval'
|
Raises:
Type | Description |
---|---|
ValueError
|
If |