提交 93b931bd authored 作者: Frederic's avatar Frederic

Skip test when no SciPy and no c++ compiler.

上级 623eb674
import time import time
from nose.plugins.skip import SkipTest
import numpy import numpy
import theano import theano
import theano.tensor as T import theano.tensor as T
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
from theano.tensor.nnet import conv from theano.tensor.nnet import conv
from theano.tensor.basic import _allclose, NotScalarConstantError from theano.tensor.basic import _allclose, NotScalarConstantError
...@@ -18,6 +18,8 @@ class TestConv2D(utt.InferShapeTester): ...@@ -18,6 +18,8 @@ class TestConv2D(utt.InferShapeTester):
self.input.name = 'default_V' self.input.name = 'default_V'
self.filters = T.dtensor4('filters') self.filters = T.dtensor4('filters')
self.filters.name = 'default_filters' self.filters.name = 'default_filters'
if not conv.imported_scipy_signal and theano.config.cxx == "":
raise SkipTest("conv2d tests need SciPy or a c++ compiler")
def validate(self, image_shape, filter_shape, def validate(self, image_shape, filter_shape,
border_mode='valid', subsample=(1, 1), border_mode='valid', subsample=(1, 1),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论