From eb722e34596be4f3980d59408c924727309f9582 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:21:04 +0800 Subject: [PATCH] refine lars (#36409) --- python/paddle/fluid/optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index efdd55d856..228ba08499 100755 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -2086,7 +2086,7 @@ class LarsMomentumOptimizer(Optimizer): # create the momentum optimize op momentum_op = block.append_op( - type=self.type, + type=self.type if _lars_weight_decay != 0.0 else 'momentum', inputs=inputs, outputs=outputs, attrs=attrs, -- GitLab