mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-28 13:20:31 +08:00
fixed dp + amp bug
This commit is contained in:
1 parent
37349ee099
commit
ed66d65a70
1 file changed
+2
-1
@@ -443,7 +443,6 @@ class Trainer(TrainerIO):
|
||||
self.optimizers = model.configure_optimizers()
|
||||
|
||||
model.cuda(self.data_parallel_device_ids[0])
|
||||
model = LightningDataParallel(model, device_ids=self.data_parallel_device_ids)
|
||||
|
||||
# run through amp wrapper
|
||||
if self.use_amp:
|
||||
@@ -453,6 +452,8 @@ class Trainer(TrainerIO):
|
||||
)
|
||||
self.optimizers = optimizers
|
||||
|
||||
model = LightningDataParallel(model, device_ids=self.data_parallel_device_ids)
|
||||
|
||||
self.__run_pretrain_routine(model)
|
||||
|
||||
def ddp_train(self, gpu_nb, model):
|
||||
|
||||
Reference in new issue
Block a user