mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-28 13:20:31 +08:00
1 parent
e339799a0a
commit
c0f3b6b035
1 file changed
+4
@@ -929,6 +929,10 @@ class Trainer(TrainerIO):
|
||||
def __train(self):
|
||||
# run all epochs
|
||||
for epoch_nb in range(self.current_epoch, self.max_nb_epochs):
|
||||
# set seed for distributed sampler (enables shuffling for each epoch)
|
||||
if self.use_ddp:
|
||||
self.tng_dataloader.sampler.set_epoch(epoch_nb)
|
||||
|
||||
# get model
|
||||
model = self.__get_model()
|
||||
|
||||
|
||||
Reference in new issue
Block a user