提交 6efb14d5 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix test following introduction of optimization dimshuffle_as_view.

上级 0603014d
...@@ -1015,15 +1015,15 @@ def test_log1p(): ...@@ -1015,15 +1015,15 @@ def test_log1p():
# the first three ops are Shape_i, Shape_i, and Dimshuffle # the first three ops are Shape_i, Shape_i, and Dimshuffle
theano.printing.debugprint(f) theano.printing.debugprint(f)
assert [node.op for node in f.maker.env.toposort()][3:] \ assert [node.op for node in f.maker.env.toposort()][3:] \
== [inplace.log1p_inplace, alloc] == [T.log1p, alloc]
f = function([x,y], T.log(0+(x) + fill(y,1.0)), mode=m) f = function([x,y], T.log(0+(x) + fill(y,1.0)), mode=m)
theano.printing.debugprint(f) theano.printing.debugprint(f)
assert [node.op for node in f.maker.env.toposort()][3:] \ assert [node.op for node in f.maker.env.toposort()][3:] \
== [inplace.log1p_inplace, alloc] == [T.log1p, alloc]
f = function([x,y], T.log(2+(x) - fill(y,1.0)), mode=m) f = function([x,y], T.log(2+(x) - fill(y,1.0)), mode=m)
theano.printing.debugprint(f) theano.printing.debugprint(f)
assert [node.op for node in f.maker.env.toposort()][3:] \ assert [node.op for node in f.maker.env.toposort()][3:] \
== [inplace.log1p_inplace, alloc] == [T.log1p, alloc]
f([1e-7, 10], [[0, 0], [0, 0]]) #debugmode will verify values f([1e-7, 10], [[0, 0], [0, 0]]) #debugmode will verify values
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论