提交 b6b797d7 authored 作者: Samira Ebrahimi Kahou's avatar Samira Ebrahimi Kahou

Modified test_opt.py to use check_stack_trace and modified check_stack_trace to…

Modified test_opt.py to use check_stack_trace and modified check_stack_trace to loop over outputs for ops_to_check=last and some refactoring
上级 e3569d12
...@@ -2667,7 +2667,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check='last', bug_print='raise'): ...@@ -2667,7 +2667,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check='last', bug_print='raise'):
# if ops_to_check is a string # if ops_to_check is a string
if isinstance(ops_to_check, string_types): if isinstance(ops_to_check, string_types):
if ops_to_check == 'last': if ops_to_check == 'last':
apply_nodes_to_check = [fgraph.outputs[0].owner] apply_nodes_to_check = [fgraph.outputs[i].owner for i in range(len(fgraph.outputs))]
elif ops_to_check == 'all': elif ops_to_check == 'all':
apply_nodes_to_check = fgraph.apply_nodes apply_nodes_to_check = fgraph.apply_nodes
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论