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

[TEST] fix test in buildbot

上级 19b2551e
...@@ -28,7 +28,7 @@ def test_profiling(): ...@@ -28,7 +28,7 @@ def test_profiling():
p = theano.ProfileStats(False) p = theano.ProfileStats(False)
if theano.config.mode in ["DebugMode", "DEBUG_MODE"]: if theano.config.mode in ["DebugMode", "DEBUG_MODE", "FAST_COMPILE"]:
m = "FAST_RUN" m = "FAST_RUN"
else: else:
m = None m = None
......
...@@ -132,17 +132,21 @@ class TestOp: ...@@ -132,17 +132,21 @@ class TestOp:
def test_op_struct(self): def test_op_struct(self):
sop = StructOp() sop = StructOp()
c = sop(theano.tensor.constant(0)) c = sop(theano.tensor.constant(0))
f = theano.function([], c) mode = None
if theano.config.mode == 'FAST_COMPILE':
mode = 'FAST_RUN'
f = theano.function([], c, mode=mode)
rval = f() rval = f()
assert rval == 0 assert rval == 0
rval = f() rval = f()
assert rval == 1 assert rval == 1
c2 = sop(theano.tensor.constant(1)) c2 = sop(theano.tensor.constant(1))
f2 = theano.function([], [c, c2]) f2 = theano.function([], [c, c2], mode=mode)
rval = f2() rval = f2()
assert rval == [0, 0] assert rval == [0, 0]
class TestMakeThunk(unittest.TestCase): class TestMakeThunk(unittest.TestCase):
def test_no_c_code(self): def test_no_c_code(self):
class IncOnePython(Op): class IncOnePython(Op):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论