Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EarlyStopping feature #4576

Merged
merged 19 commits into from
Aug 28, 2021
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
glenn-jocher committed Aug 28, 2021
commit 6c320a4c8b5b4ccbe00cd82a860ce24818edc030
2 changes: 1 addition & 1 deletion utils/torch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class EarlyStopping:
def __init__(self, patience=30):
self.best_fitness = 0 # i.e. mAP
self.best_epoch = 0
self.patience = patience
self.patience = patience # epochs to wait after fitness stops improving to stop

def __call__(self, epoch, fitness):
if fitness > self.best_fitness:
Expand Down