mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-04 13:00:36 +08:00
added single node distdataparallel
This commit is contained in:
1 parent
d52c92e09d
commit
98a0a23158
1 file changed
+2
-2
@@ -284,7 +284,7 @@ class Trainer(TrainerIO):
|
||||
# when GPU is called, spawn off a single worker for each gpu
|
||||
if self.on_gpu:
|
||||
rank = 0
|
||||
self.model = model
|
||||
# self.model = model
|
||||
mp.spawn(dummy, nprocs=len(self.data_parallel_device_ids), args=(self, ))
|
||||
else:
|
||||
self.__run_pretrain_routine(model)
|
||||
@@ -292,7 +292,7 @@ class Trainer(TrainerIO):
|
||||
def __getstate__(self):
|
||||
""" This is called before pickling. """
|
||||
state = self.__dict__.copy()
|
||||
del state['experiment']
|
||||
# del state['experiment']
|
||||
return state
|
||||
|
||||
def __dp_train(self, gpu_nb, proc_rank):
|
||||
|
||||
Reference in new issue
Block a user