mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Make sure train doesn't crash when called at max_epoch (#608)
This commit is contained in:
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)
|
||||
|
||||
Reference in New Issue
Block a user