mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Update trainer.py
This commit is contained in:
committed by
Jiri BOROVEC
parent
b2d1a24999
commit
97a9a0f6c1
@@ -180,7 +180,8 @@ class Trainer(TrainerIO):
|
||||
|
||||
# make DP and DDP mutually exclusive
|
||||
# single GPU will also use DP with devices=[0]
|
||||
if self.data_parallel_device_ids:
|
||||
requested_gpus = self.data_parallel_device_ids is not None
|
||||
if requested_gpus and len(self.data_parallel_device_ids) > 0:
|
||||
self.use_dp = distributed_backend == 'dp'
|
||||
self.use_ddp = distributed_backend == 'ddp'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user