(self, patience: int = 10, min_delta: float = 0.0, mode: str = 'min')
| 92 | |
| 93 | class EarlyStopping: |
| 94 | def __init__(self, patience: int = 10, min_delta: float = 0.0, mode: str = 'min'): |
| 95 | self.patience = patience |
| 96 | self.min_delta = min_delta |
| 97 | self.mode = mode |
| 98 | self.counter = 0 |
| 99 | self.best_score = None |
| 100 | self.early_stop = False |
| 101 | |
| 102 | def __call__(self, score: float) -> bool: |
| 103 | if self.best_score is None: |
nothing calls this directly
no outgoing calls
no test coverage detected