added single gpu train test

This commit is contained in:
William Falcon
2019-08-07 13:43:28 -04:00
parent c7e8436083
commit e30514922b
+1 -1
View File
@@ -196,7 +196,7 @@ class Trainer(TrainerIO):
warnings.warn(w)
# remove dp and ddp when requesting single gpu
if len(self.data_parallel_device_ids) == 1:
if self.data_parallel_device_ids is not None and len(self.data_parallel_device_ids) == 1:
self.use_ddp = False
self.use_dp = False
self.single_gpu = True