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

added one bug_print ignore in non-deterministic unit test and fixed formatting.

上级 ef128a9a
...@@ -2715,8 +2715,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check='last', bug_print='raise'): ...@@ -2715,8 +2715,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check='last', bug_print='raise'):
for node in apply_nodes_to_check: for node in apply_nodes_to_check:
for output in node.outputs: for output in node.outputs:
if (not hasattr(output.tag, 'trace') or if (not hasattr(output.tag, 'trace') or not output.tag.trace):
not output.tag.trace):
return False return False
return True return True
...@@ -2960,8 +2960,10 @@ def test_local_IncSubtensor_serialize(): ...@@ -2960,8 +2960,10 @@ def test_local_IncSubtensor_serialize():
# Now test that the stack trace is copied over properly, # Now test that the stack trace is copied over properly,
# if we return the gradients. We need to use same mode as before. # if we return the gradients. We need to use same mode as before.
# the optimizer may delete all instances of AdvancedIncSubtensor
f = theano.function([i, j, t], dW, mode=mode) f = theano.function([i, j, t], dW, mode=mode)
assert check_stack_trace(f, ops_to_check=tensor.AdvancedIncSubtensor) assert check_stack_trace(f, ops_to_check=tensor.AdvancedIncSubtensor,
bug_print='ignore')
def test_local_set_to_inc_subtensor(): def test_local_set_to_inc_subtensor():
v = theano.tensor.fmatrix() v = theano.tensor.fmatrix()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论