提交 270c31bc 编写于 作者: G Gregory Chanan

Avoid variable name shadowing in list comprehension, because it rebinds in...

Avoid variable name shadowing in list comprehension, because it rebinds in python2, but not python3.
上级 58376339
......@@ -350,7 +350,7 @@ def backward_declaration(base, thnn_functions):
pass
else:
base_name = arg['name'][len('grad_'):] if arg['name'] != 'grad_input' else 'self'
if base_name in [arg['name'] for arg in arguments]:
if base_name in [a['name'] for a in arguments]:
scalar_check[arg['name']] = base_name + '_->isScalar()'
else:
raise ValueError(("Could not infer scalar_check for {} argument of func {} because {} "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册