diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index 5a13ee536810cd065b7b050f4c82a8ecb6fd4432..5cdbe7c10d3ed635062d8df87df3f041e32e9eab 100644 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -315,7 +315,7 @@ class Optimizer(object): block=loss.block, name=param._ivar._grad_name(), stop_gradient=True) - grad_var._value = param._ivar._grad_var() + grad_var._value = param._ivar.grad_value() params_grads.append((param, grad_var)) optimize_ops = self._create_optimization_pass(params_grads, loss,