set dp as default backend

This commit is contained in:
William Falcon 2019-07-18 11:33:51 -04:00
parent c163caf8cb
commit e02857fcce
1 changed files with 3 additions and 3 deletions

View File

@ -363,9 +363,6 @@ class Trainer(TrainerIO):
# filter out the weights that were done on gpu so we can load on good old cpus
self.optimizers = model.configure_optimizers()
# attach model to DP
model = LightningDataParallel(model, device_ids=self.data_parallel_device_ids)
# run through amp wrapper
if self.use_amp:
# An example
@ -374,6 +371,9 @@ class Trainer(TrainerIO):
)
self.optimizers = optimizers
if self.on_gpu:
model = LightningDataParallel(model, device_ids=self.data_parallel_device_ids)
self.__run_pretrain_routine(model)
def ddp_train(self, gpu_nb, model):