提交 4b15a1b7 authored 作者: nouiz's avatar nouiz

Merge pull request #255 from nouiz/fix_test

fix test in FAST_COMPILE.
......@@ -50,8 +50,9 @@ class test_ifelse(unittest.TestCase):
vx = numpy.asarray(rng.uniform(size=(xlen,)), theano.config.floatX)
vy = numpy.asarray(rng.uniform(size=(ylen,)), theano.config.floatX)
assert numpy.all([x.op.as_view for x in f.maker.env.toposort() if
isinstance(x.op, IfElse)])
if theano.config.mode != "FAST_COMPILE":
assert numpy.all([x.op.as_view for x in f.maker.env.toposort() if
isinstance(x.op, IfElse)])
assert len([x.op for x in f.maker.env.toposort()
if isinstance(x.op, IfElse)]) > 0
assert numpy.allclose(vx, f(1, vx, vy))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论