提交 9fa8a6ff authored 作者: Frederic's avatar Frederic

Fix test since now we introduce less neg node.

上级 6fd91c68
......@@ -162,7 +162,7 @@ class T_sigmoid_opts(unittest.TestCase):
f = theano.function([x], (T.fill(x, -1.0) * T.exp(x)) /
((1 + T.exp(x)) * (1 + T.exp(-x))), mode=m)
assert [node.op for node in f.maker.fgraph.toposort()] == [sigmoid,
T.mul, theano.tensor.inplace.neg_inplace]
T.mul]
f(data)
f = theano.function([x], (T.fill(x, -1.1) * T.exp(x)) /
((1 + T.exp(x)) * (1 + T.exp(-x))), mode=m)
......@@ -238,7 +238,7 @@ class T_sigmoid_opts(unittest.TestCase):
tensor.exp(x * y) * tensor.exp(y)),
mode=m)
match(f, [sigmoid, tensor.mul, tensor.neg, tensor.exp, sigmoid,
tensor.mul, tensor.neg])
tensor.mul])
def test_perform_sigm_times_exp(self):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论