mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
early epoch stopping
This commit is contained in:
@@ -309,6 +309,7 @@ class Trainer(TrainerIO):
|
||||
if self.__is_function_implemented('on_batch_end'):
|
||||
self.model.on_batch_end()
|
||||
|
||||
# end epoch early
|
||||
if early_stop_epoch:
|
||||
break
|
||||
|
||||
@@ -326,6 +327,7 @@ class Trainer(TrainerIO):
|
||||
if stop:
|
||||
return
|
||||
|
||||
|
||||
def __run_tng_batch(self, data_batch):
|
||||
if data_batch is None:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user