Skip to content

Commit

Permalink
Revert "Fixes EarlyStopping With Precision=16 (#1996)" (#2032)
Browse files Browse the repository at this point in the history
This reverts commit bf39cb2.
  • Loading branch information
williamFalcon authored and justusschock committed Jun 29, 2020
1 parent 35942ce commit e749cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/callbacks/early_stopping.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def on_train_start(self, trainer, pl_module):
# Allow instances to be re-used
self.wait = 0
self.stopped_epoch = 0
self.best = -torch_inf if self.monitor_op(torch.Tensor(1), torch.Tensor(2))[0].item() else torch_inf
self.best = torch_inf if self.monitor_op == torch.lt else -torch_inf

def on_validation_end(self, trainer, pl_module):
self._run_early_stopping_check(trainer, pl_module)
Expand Down

0 comments on commit e749cae

Please sign in to comment.