mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
scaled batch size
This commit is contained in:
@@ -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