mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
added fallback local init
This commit is contained in:
1 parent
52a98d76d8
commit
9ccfc7bd33
1 file changed
+1
-1
@@ -291,7 +291,7 @@ class Trainer(TrainerIO):
|
||||
|
||||
# when using gpus, first thing we do is spawn a new process between each worker
|
||||
# applies to single gpu, multi-gpu and multi-nodes
|
||||
if self.on_gpu:
|
||||
if self.on_gpu and len(self.data_parallel_device_ids) > 1:
|
||||
self.experiment = self.experiment.get_meta_copy()
|
||||
mp.spawn(self.dp_train, nprocs=len(self.data_parallel_device_ids), args=(model, ))
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user