added single node distdataparallel

This commit is contained in:
William Falcon
2019-07-03 15:26:19 -04:00
parent 09ed6904c2
commit d52c92e09d
+1 -2
View File
@@ -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,6 @@ class Trainer(TrainerIO):
def __getstate__(self):
""" This is called before pickling. """
state = self.__dict__.copy()
# del state['cluster']
del state['experiment']
return state