提交 2b4b44d5 authored 作者: Frederic's avatar Frederic

fix test in FAST_COMPILE.

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