From 305566eed4a62a7af178b78ea21f89c8eb73b59b Mon Sep 17 00:00:00 2001 From: Helin Wang Date: Mon, 27 Feb 2017 15:09:56 -0800 Subject: [PATCH] fix parameters.append_gradient_machine append_gradient_machine should append __gradient_machines__ in all conditions. --- python/paddle/v2/parameters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/parameters.py b/python/paddle/v2/parameters.py index ea504d5104..f2c5a4d49c 100644 --- a/python/paddle/v2/parameters.py +++ b/python/paddle/v2/parameters.py @@ -224,7 +224,8 @@ class Parameters(object): except ValueError: # If no such parameter in gradient machine, then don't copy pass - self.__gradient_machines__.append(gradient_machine) + + self.__gradient_machines__.append(gradient_machine) def __get_parameter_in_gradient_machine__(gradient_machine, name): -- GitLab