diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index e0ac8ea16bbc3cb0728e05e741eb53c0e980bdae..537c0d4c2152fc258f5f7bf4a004d1fb9fc5c663 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -256,8 +256,7 @@ class Trainer(object): model = self.model if self.cfg.get('fleet', False): model = fleet.distributed_model(model) - self.optimizer = fleet.distributed_optimizer( - self.optimizer).user_defined_optimizer + self.optimizer = fleet.distributed_optimizer(self.optimizer) elif self._nranks > 1: find_unused_parameters = self.cfg[ 'find_unused_parameters'] if 'find_unused_parameters' in self.cfg else False