scaled batch size

This commit is contained in:
William Falcon 2019-07-08 19:55:26 -04:00
parent a87073bffd
commit 0bd9152e0a
1 changed files with 1 additions and 0 deletions

View File

@ -168,6 +168,7 @@ class LightningTemplateModel(LightningModule):
print(dist.get_world_size()) print(dist.get_world_size())
train_sampler = DistributedSampler(dataset, rank=self.trainer.proc_rank) train_sampler = DistributedSampler(dataset, rank=self.trainer.proc_rank)
batch_size = batch_size // self.trainer.world_size # scale batch size batch_size = batch_size // self.trainer.world_size # scale batch size
print(batch_size)
# except Exception as e: # except Exception as e:
# pass # pass