提交 e78217fd authored 作者: Frederic's avatar Frederic

remove warning in a test.

上级 b2bdd210
...@@ -49,7 +49,7 @@ def test_optimizer(): ...@@ -49,7 +49,7 @@ def test_optimizer():
f = theano.function([x], [theano.tensor.log(x) * x], f = theano.function([x], [theano.tensor.log(x) * x],
mode=mode) mode=mode)
# Test that the fusion wasn't done # Test that the fusion wasn't done
assert len(f.maker.fgraph.nodes) == 2 assert len(f.maker.fgraph.apply_nodes) == 2
f(0) # log(0) * 0 = -inf * 0 = NaN f(0) # log(0) * 0 = -inf * 0 = NaN
# Test that we still detect the nan # Test that we still detect the nan
...@@ -83,7 +83,7 @@ def test_not_inplace(): ...@@ -83,7 +83,7 @@ def test_not_inplace():
mode=mode) mode=mode)
# Test that the fusion wasn't done # Test that the fusion wasn't done
assert len(f.maker.fgraph.nodes) == 5 assert len(f.maker.fgraph.apply_nodes) == 5
assert not f.maker.fgraph.toposort()[-1].op.destroy_map assert not f.maker.fgraph.toposort()[-1].op.destroy_map
f([0, 0]) # log(0) * 0 = -inf * 0 = NaN f([0, 0]) # log(0) * 0 = -inf * 0 = NaN
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论