From 3ba8629c0153766eaf5012189bac96616cc206d5 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Mon, 28 Jun 2021 21:00:59 +0800 Subject: [PATCH] fix fleet train (#3528) --- 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 e0ac8ea16..537c0d4c2 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 -- GitLab