scaled batch size

This commit is contained in:
William Falcon 2019-07-08 19:57:06 -04:00
parent 2b16c75499
commit 9d35b5b4f7
1 changed files with 1 additions and 0 deletions

View File

@ -164,6 +164,7 @@ class LightningTemplateModel(LightningModule):
try:
if self.on_gpu:
print('distributing')
train_sampler = DistributedSampler(dataset, rank=self.trainer.proc_rank)
batch_size = batch_size // self.trainer.world_size # scale batch size
except Exception as e: