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

Fix test problem uncovered by test clean up (we where changed c_thunk=True…

Fix test problem uncovered by test clean up (we where changed c_thunk=True globally, as we didn't do a deepcopy).
上级 25085feb
...@@ -285,7 +285,9 @@ class TestCorrConv2d(BaseTestConv2d): ...@@ -285,7 +285,9 @@ class TestCorrConv2d(BaseTestConv2d):
def tcase(self, i, f, s, b, flip, provide_shape): def tcase(self, i, f, s, b, flip, provide_shape):
o = self.get_output_shape(i, f, s, b) o = self.get_output_shape(i, f, s, b)
if not theano.config.blas.ldflags: if (not theano.config.blas.ldflags or
not theano.config.cxx or
theano.config.mode == "FAST_COMPILE"):
raise SkipTest("Need blas to test conv2d") raise SkipTest("Need blas to test conv2d")
self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s, self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s,
verify_grad=True, provide_shape=provide_shape, verify_grad=True, provide_shape=provide_shape,
...@@ -541,7 +543,10 @@ class TestBilinearUpsampling(unittest.TestCase): ...@@ -541,7 +543,10 @@ class TestBilinearUpsampling(unittest.TestCase):
# If BLAS is not available on CPU, then we accept the fallback to the # If BLAS is not available on CPU, then we accept the fallback to the
# slow Python implementation for that test. # slow Python implementation for that test.
compile_mode = theano.compile.mode.get_default_mode() compile_mode = theano.compile.mode.get_default_mode()
if not theano.config.blas.ldflags: if theano.config.mode == "FAST_COMPILE":
compile_mode = compile_mode.excluding("conv_gemm")
compile_mode = compile_mode.excluding('AbstractConvCheck')
elif not theano.config.blas.ldflags or not theano.config.cxx:
compile_mode = compile_mode.excluding('AbstractConvCheck') compile_mode = compile_mode.excluding('AbstractConvCheck')
def numerical_kernel_1D(self, ratio): def numerical_kernel_1D(self, ratio):
......
...@@ -236,6 +236,8 @@ class TestCorr2D(utt.InferShapeTester): ...@@ -236,6 +236,8 @@ class TestCorr2D(utt.InferShapeTester):
@attr('slow') @attr('slow')
def test_infer_shape_forward(self): def test_infer_shape_forward(self):
if theano.config.mode == "FAST_COMPILE":
raise SkipTest("CorrMM don't work in FAST_COMPILE")
def rand(*shape): def rand(*shape):
r = numpy.asarray(numpy.random.rand(*shape), dtype='float64') r = numpy.asarray(numpy.random.rand(*shape), dtype='float64')
...@@ -265,6 +267,8 @@ class TestCorr2D(utt.InferShapeTester): ...@@ -265,6 +267,8 @@ class TestCorr2D(utt.InferShapeTester):
@attr('slow') @attr('slow')
def test_infer_shape_gradW(self): def test_infer_shape_gradW(self):
if theano.config.mode == "FAST_COMPILE":
raise SkipTest("CorrMM don't work in FAST_COMPILE")
def rand(*shape): def rand(*shape):
r = numpy.asarray(numpy.random.rand(*shape), dtype='float64') r = numpy.asarray(numpy.random.rand(*shape), dtype='float64')
...@@ -301,6 +305,8 @@ class TestCorr2D(utt.InferShapeTester): ...@@ -301,6 +305,8 @@ class TestCorr2D(utt.InferShapeTester):
@attr('slow') @attr('slow')
def test_infer_shape_gradI(self): def test_infer_shape_gradI(self):
if theano.config.mode == "FAST_COMPILE":
raise SkipTest("CorrMM don't work in FAST_COMPILE")
def rand(*shape): def rand(*shape):
r = numpy.asarray(numpy.random.rand(*shape), dtype='float64') r = numpy.asarray(numpy.random.rand(*shape), dtype='float64')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论