fixed ddp crash

This commit is contained in:
William Falcon 2019-07-21 20:06:03 -04:00
parent 3f76152470
commit 7da133d91d
1 changed files with 2 additions and 2 deletions

View File

@ -178,9 +178,9 @@ class Trainer(TrainerIO):
self.use_ddp = distributed_backend == 'ddp'
# use ddp automatically if nb_gpu_nodes > 1
if nb_gpu_nodes > 1:
if nb_gpu_nodes > 1 and self.use_dp:
self.use_ddp = True
self.use_ddp = False
self.use_dp = False
w = 'DataParallel does not support nb_gpu_nodes > 1. ' \
'Switching to DistributedDataParallel for you. ' \
'To silence this warning set distributed_backend=ddp'