mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-29 13:30:57 +08:00
scaled batch size
This commit is contained in:
1 parent
a87073bffd
commit
0bd9152e0a
1 file changed
+1
@@ -168,6 +168,7 @@ class LightningTemplateModel(LightningModule):
|
||||
print(dist.get_world_size())
|
||||
train_sampler = DistributedSampler(dataset, rank=self.trainer.proc_rank)
|
||||
batch_size = batch_size // self.trainer.world_size # scale batch size
|
||||
print(batch_size)
|
||||
|
||||
# except Exception as e:
|
||||
# pass
|
||||
|
||||
Reference in new issue
Block a user