提交 b9d6183a authored 作者: Frederic Bastien's avatar Frederic Bastien

marked 4 test as KnownFailure.

上级 616739eb
...@@ -18,6 +18,7 @@ from theano.compile.mode import get_default_mode ...@@ -18,6 +18,7 @@ from theano.compile.mode import get_default_mode
from theano import function from theano import function
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
from numpy.testing import dec
### seed random number generator so that unittests are deterministic ### ### seed random number generator so that unittests are deterministic ###
utt.seed_rng() utt.seed_rng()
...@@ -1576,6 +1577,8 @@ class T_tensorfromscalar(unittest.TestCase): ...@@ -1576,6 +1577,8 @@ class T_tensorfromscalar(unittest.TestCase):
self.failUnless(isinstance(v, numpy.ndarray)) self.failUnless(isinstance(v, numpy.ndarray))
self.failUnless(v.shape == (), v.shape) self.failUnless(v.shape == (), v.shape)
@dec.knownfailureif(isinstance(get_default_mode(),theano.compile.debugmode.DebugMode),
"This test fail in DEBUG_MODE but this don't make theano generate some bad code. It is a trouble with DEBUG_MODE")
def test1(self): def test1(self):
s = scal.constant(56) s = scal.constant(56)
t = as_tensor_variable(s) t = as_tensor_variable(s)
...@@ -1594,6 +1597,8 @@ class T_tensorfromscalar(unittest.TestCase): ...@@ -1594,6 +1597,8 @@ class T_tensorfromscalar(unittest.TestCase):
self.failUnless(eval_outputs([g])==1) self.failUnless(eval_outputs([g])==1)
class T_scalarfromtensor(unittest.TestCase): class T_scalarfromtensor(unittest.TestCase):
@dec.knownfailureif(isinstance(get_default_mode(),theano.compile.debugmode.DebugMode),
"This test fail in DEBUG_MODE but this don't make theano generate some bad code. It is a trouble with DEBUG_MODE")
def test0(self): def test0(self):
tt = constant(56)#scal.constant(56) tt = constant(56)#scal.constant(56)
ss = scalar_from_tensor(tt) ss = scalar_from_tensor(tt)
...@@ -2398,6 +2403,8 @@ def test_sum_overflow(): ...@@ -2398,6 +2403,8 @@ def test_sum_overflow():
f = function([a], sum(a)) f = function([a], sum(a))
assert f([1]*300) == 300 assert f([1]*300) == 300
@dec.knownfailureif(isinstance(get_default_mode(),theano.compile.debugmode.DebugMode),
"This test fail in DEBUG_MODE but this don't make theano generate some bad code. It is a trouble in DEBUG_MODE")
def test_default(): def test_default():
x, y = scalars('xy') x, y = scalars('xy')
z = default(x, y) z = default(x, y)
...@@ -2406,6 +2413,8 @@ def test_default(): ...@@ -2406,6 +2413,8 @@ def test_default():
assert f(None, 2) == 2 assert f(None, 2) == 2
assert f(1, None) == 1 assert f(1, None) == 1
@dec.knownfailureif(isinstance(get_default_mode(),theano.compile.debugmode.DebugMode),
"This test fail in DEBUG_MODE but this don't make theano generate some bad code. It is a trouble in DEBUG_MODE")
def test_default_state(): def test_default_state():
x, y = scalars('xy') x, y = scalars('xy')
print config.floatX print config.floatX
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论