Changed order of update_learning_rates() and run_training_teardown(). (#1891)

This commit is contained in:
Kevin Trebing
2020-05-19 13:16:26 -04:00
committed by GitHub
parent 9b629637b8
commit 3459a54667
+3 -3
View File
@@ -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