From 7f8eb5a2b1c5847d39b7091965c319911a043066 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Mon, 28 Jun 2021 21:00:48 +0800 Subject: [PATCH] fix fleet train (#3527) --- ppdet/engine/trainer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index 424e94742..fa293cd31 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -301,8 +301,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 -- GitLab