mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-26 13:00:58 +08:00
scaled batch size
This commit is contained in:
1 parent
b644234d08
commit
f95fad864d
1 file changed
+1
-1
@@ -164,7 +164,7 @@ class LightningTemplateModel(LightningModule):
|
||||
|
||||
# try:
|
||||
# if self.on_gpu:
|
||||
train_sampler = DistributedSampler(dataset, num_replicas=self.trainer.world_size, 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
|
||||
|
||||
# except Exception as e:
|
||||
|
||||
Reference in new issue
Block a user