提交 dbb78494 编写于 作者: W WangXi 提交者: sandyhouse

fix var in c_reduce_sum

上级 17bd776e
......@@ -51,6 +51,7 @@ class GradientClipHelper(object):
if deperate_op:
deperate_op_idx.add(idx)
for output_name in op.desc.output_arg_names():
if output_name not in op.desc.input_arg_names():
deperated_vars.add(output_name)
if not deperated_vars:
......@@ -111,7 +112,6 @@ class GradientClipHelper(object):
to_check_param - should_check_param)
for var_name in deperated_vars:
if block.has_var(var_name):
block._remove_var(var_name, sync=False)
block._sync_with_cpp()
return
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册