未验证 提交 a9f7cd34 编写于 作者: Y Yang yaming 提交者: GitHub

Merge pull request #7278 from pkuyym/fix-7216

Bug fix when inserting fill_zeros_like_op.
...@@ -162,7 +162,7 @@ def _remove_no_grad_branch_(op_descs, no_grad_set): ...@@ -162,7 +162,7 @@ def _remove_no_grad_branch_(op_descs, no_grad_set):
if core.grad_var_suffix() in arg and arg in no_grad_set: if core.grad_var_suffix() in arg and arg in no_grad_set:
to_insert.append((_create_op_desc_("fill_zeros_like", { to_insert.append((_create_op_desc_("fill_zeros_like", {
"X": [_strip_grad_suffix_(arg)] "X": [_strip_grad_suffix_(arg)]
}, {"Y": [arg]}, {}), idx)) }, {"Out": [arg]}, {}), idx))
map(lambda p: op_descs.insert(p[1], p[0]), reversed(to_insert)) map(lambda p: op_descs.insert(p[1], p[0]), reversed(to_insert))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册