提交 a4bc6622 authored 作者: Frederic's avatar Frederic

Fix test in FAST_COMPILE

上级 dc13bfca
...@@ -21,7 +21,10 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase): ...@@ -21,7 +21,10 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase):
def setUp(self): def setUp(self):
utt.seed_rng() utt.seed_rng()
self.mode = theano.compile.get_default_mode().excluding( mode = None
if theano.config.mode == "FAST_COMPILE":
mode = "FAST_RUN"
self.mode = theano.compile.get_mode(mode).excluding(
'constant_folding' 'constant_folding'
) )
self.gemv_op = sparse_block_gemv self.gemv_op = sparse_block_gemv
...@@ -304,7 +307,7 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase): ...@@ -304,7 +307,7 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase):
out = self.outer_op(o, x, y, xIdx, yIdx) out = self.outer_op(o, x, y, xIdx, yIdx)
f = theano.function([o, x, y, xIdx, yIdx], out, f = theano.function([o, x, y, xIdx, yIdx], out,
on_unused_input="warn") on_unused_input="warn", mode=self.mode)
o_val, x_val, y_val, xIdx_val, yIdx_val = \ o_val, x_val, y_val, xIdx_val, yIdx_val = \
BlockSparse_Gemv_and_Outer.outer_data() BlockSparse_Gemv_and_Outer.outer_data()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论