Skip to content

Commit

Permalink
Merge pull request #85 from SunQpark/early-stop
Browse files Browse the repository at this point in the history
fix issue #84
  • Loading branch information
SunQpark authored Dec 15, 2020
2 parents 85c5535 + 5a92869 commit 41dc06f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def __init__(self, model, criterion, metric_ftns, optimizer, config):

self.mnt_best = inf if self.mnt_mode == 'min' else -inf
self.early_stop = cfg_trainer.get('early_stop', inf)
if self.early_stop <= 0:
self.early_stop = inf

self.start_epoch = 1

Expand Down

0 comments on commit 41dc06f

Please sign in to comment.