class documentation
class EarlyStopping(BaseCallback): (source)
Constructor: EarlyStopping(monitor, patience, verbose, **kwargs)
Early Stopper
This callback method monitors a given metric and then stops the training early if the metric doesn't improve for a given amount of time
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 | _patience |
Undocumented |
Instance Variable | _patience |
Undocumented |
Instance Variable | _verbose |
Undocumented |
def __init__(self, monitor:
str
= 'loss', patience: int
= 10, verbose: bool
= False, **kwargs):
(source)
¶
Initialize
- Args
- monitor:
- The metric to monitor. It is one of the 4: loss, acc, val_loss, val_acc
- patience:
- How many epoch to monitor before stopping
- verbose:
- Log callback function logs