未验证 提交 f2cf2a7a 编写于 作者: F fengjiayi 提交者: GitHub

Merge pull request #8800 from JiayiFeng/fix_a_bug_in_backward

fix a bug in backward
...@@ -486,7 +486,7 @@ def append_backward(loss, parameter_list=None, no_grad_set=None, ...@@ -486,7 +486,7 @@ def append_backward(loss, parameter_list=None, no_grad_set=None,
params_and_grads = [] params_and_grads = []
for param in parameters: for param in parameters:
if param not in grad_info_map: if param not in grad_info_map:
raise ValueError("param %s is not in map" % param) continue
grad_info = grad_info_map[param] grad_info = grad_info_map[param]
grad_block = grad_info[1] grad_block = grad_info[1]
if not grad_block.has_var(grad_info[0]): if not grad_block.has_var(grad_info[0]):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册