From ef9098a325eb7ed6d443a3241575754e8c559883 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Wed, 24 Jan 2018 17:16:59 +0800 Subject: [PATCH] fix a bug --- python/paddle/v2/fluid/backward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/backward.py b/python/paddle/v2/fluid/backward.py index ae81d68bafd..29243c90e87 100644 --- a/python/paddle/v2/fluid/backward.py +++ b/python/paddle/v2/fluid/backward.py @@ -178,7 +178,7 @@ def _remove_no_grad_branch_(op_descs, no_grad_set): if _all_in_set_( filter(lambda name: name.find(core.grad_var_suffix()) != -1, op_desc.input_arg_names()), no_grad_set): - no_grad_set.union(out_arg_names) + no_grad_set.update(out_arg_names) return True return False -- GitLab