mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
Changed order of update_learning_rates() and run_training_teardown(). (#1891)
This commit is contained in:
@@ -347,13 +347,13 @@ class TrainerTrainLoopMixin(ABC):
|
||||
# -----------------
|
||||
self.run_training_epoch()
|
||||
|
||||
# update LR schedulers
|
||||
self.update_learning_rates(interval='epoch')
|
||||
|
||||
if self.max_steps and self.max_steps == self.global_step:
|
||||
self.run_training_teardown()
|
||||
return
|
||||
|
||||
# update LR schedulers
|
||||
self.update_learning_rates(interval='epoch')
|
||||
|
||||
# early stopping
|
||||
met_min_epochs = epoch >= self.min_epochs - 1
|
||||
met_min_steps = self.global_step >= self.min_steps if self.min_steps else True
|
||||
|
||||
Reference in New Issue
Block a user