提交 880c2a94 编写于 作者: P pangyoki 提交者: jzhang533

fix format

上级 eade1fd9
......@@ -1313,8 +1313,8 @@ def _append_backward_vars_(block, start_op_idx, grad_to_var, grad_info_map):
if grad_var_ins:
existing_grad_var_ins = [
var for var in grad_var_ins
if block.desc.has_var_recursive(cpt.to_bytes(var)) or
var in parent_op_vars
if block.desc.has_var_recursive(cpt.to_bytes(var)) or var in
parent_op_vars
]
if not existing_grad_var_ins:
'''
......
......@@ -312,7 +312,7 @@ def grad_check(x,
_compute_analytical_jacobian(prog, clone_x, clone_y, place, scope))
for i, (x_idx,
y_idx) in enumerate(product(* [range(len(x)), range(len(y))])):
y_idx) in enumerate(product(*[range(len(x)), range(len(y))])):
a = analytical[y_idx][x_idx]
n = numerical[x_idx][y_idx]
if not np.allclose(a, n, rtol, atol):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册