Make sure train doesn't crash when called at max_epoch (#608)

This commit is contained in:
Nic Eggert
2019-12-07 23:22:03 -05:00
committed by William Falcon
parent 4970624f8b
commit 2baa80d626
@@ -258,6 +258,7 @@ class TrainerTrainLoopMixin(ABC):
pass
def train(self):
model = self.get_model()
# run all epochs
for epoch in range(self.current_epoch, self.max_epochs):
# set seed for distributed sampler (enables shuffling for each epoch)