提交 604ac73b authored 作者: Frederic's avatar Frederic

Fix test in float32 and in FAST_COMPILE.

上级 00483dbc
......@@ -41,13 +41,19 @@ def test_inter_process_cache():
"""
x, y = theano.tensor.vectors('xy')
x, y = theano.tensor.dvectors('xy')
f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
f(numpy.arange(60), numpy.arange(60))
assert MyOp.nb_called == 1
if theano.config.mode == 'FAST_COMPILE':
assert MyOp.nb_called == 0
else:
assert MyOp.nb_called == 1
# What if we compile a new function with new variables?
x, y = theano.tensor.vectors('xy')
x, y = theano.tensor.dvectors('xy')
f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
f(numpy.arange(60), numpy.arange(60))
assert MyOp.nb_called == 1
if theano.config.mode == 'FAST_COMPILE':
assert MyOp.nb_called == 0
else:
assert MyOp.nb_called == 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论