mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-04 13:00:36 +08:00
This reverts commit bf39cb26c5.
This commit is contained in:
1 parent
bf39cb26c5
commit
0be530a427
1 file changed
+1
-1
@@ -107,7 +107,7 @@ class EarlyStopping(Callback):
|
||||
# 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)
|
||||
|
||||
Reference in new issue
Block a user