提交 2fc9f319 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Change the base conv test class so it doesn't get tested itself.

上级 1b4784a9
......@@ -19,7 +19,7 @@ else:
mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu')
class TestDnnConv2d(test_abstract_conv.TestConv2d):
class TestDnnConv2d(test_abstract_conv.BaseTestConv2d):
def setUp(self):
super(TestDnnConv2d, self).setUp()
# provide_shape is not used by the CuDNN impementation
......
......@@ -9,7 +9,7 @@ from .config import mode_with_gpu, test_ctx_name
gpu_ftensor4 = GpuArrayType(dtype='float32', broadcastable=(False,) * 4)
class TestDnnConv2d(test_abstract_conv.TestConv2d):
class TestDnnConv2d(test_abstract_conv.BaseTestConv2d):
def setUp(self):
super(TestDnnConv2d, self).setUp()
self.shared = gpuarray_shared_constructor
......
......@@ -56,9 +56,8 @@ class TestGetConvOutShape(unittest.TestCase):
self.assertTrue(test4_params == (3, 4, 6, 4))
class TestConv2d(unittest.TestCase):
class BaseTestConv2d(object):
def setUp(self):
super(TestConv2d, self).setUp()
self.inputs_shapes = [(8, 1, 12, 12), (8, 1, 18, 18), (2, 1, 4, 4),
(6, 1, 10, 11), (2, 1, 6, 5), (1, 5, 9, 9)]
self.filters_shapes = [(5, 1, 2, 2), (4, 1, 3, 3), (2, 1, 3, 3),
......@@ -252,7 +251,7 @@ class TestConv2d(unittest.TestCase):
self.tcase(i, f, ds, db, flip, dprovide_shape)
class TestCorrConv2d(TestConv2d):
class TestCorrConv2d(BaseTestConv2d):
def tcase(self, i, f, s, b, flip, provide_shape):
o = self.get_output_shape(i, f, s, b)
self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s,
......@@ -268,7 +267,7 @@ class TestCorrConv2d(TestConv2d):
filter_flip=flip, target_op=CorrMM_gradInputs)
class TestCpuConv2d(TestConv2d):
class TestCpuConv2d(BaseTestConv2d):
def setUp(self):
super(TestCpuConv2d, self).setUp()
self.mode = theano.compile.mode.get_default_mode().excluding('conv_gemm')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论