提交 4475869c authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Split long test.

上级 cd9c1930
...@@ -224,24 +224,22 @@ class TestCorr3D(utt.InferShapeTester): ...@@ -224,24 +224,22 @@ class TestCorr3D(utt.InferShapeTester):
self.validate((1, 1, 6, 6, 6), (1, 1, 3, 3, 3), 1, subsample=(3, 3, 3), filter_dilation=(2, 2, 2)) self.validate((1, 1, 6, 6, 6), (1, 1, 3, 3, 3), 1, subsample=(3, 3, 3), filter_dilation=(2, 2, 2))
@attr('slow') @parameterized.expand([('valid',), ('full',), ('half',), ((1, 1, 1),),
def test_shape_Constant_tensor(self): ((2, 1, 1),), ((1, 2, 1),), ((1, 1, 2),),
""" ((3, 3, 3),), (1,)])
Tests correlation where the {image,filter}_shape is a Constant tensor. # @attr('slow')
""" def test_shape_Constant_tensor(self, border_mode):
# Tests correlation where the {image,filter}_shape is a Constant tensor
as_t = T.as_tensor_variable as_t = T.as_tensor_variable
border_modes = ['valid', 'full', 'half', (1, 1, 1), (2, 1, 1), self.validate((as_t(3), as_t(2), as_t(7), as_t(5), as_t(5)),
(1, 2, 1), (1, 1, 2), (3, 3, 3), 1] (5, 2, 2, 3, 3), border_mode)
self.validate(as_t([3, 2, 7, 5, 5]), (5, 2, 2, 3, 3), border_mode)
for border_mode in border_modes: self.validate(as_t((3, 2, 7, 5, 5)), (5, 2, 2, 3, 3), border_mode)
self.validate((as_t(3), as_t(2), as_t(7), as_t(5), as_t(5)), self.validate((3, 2, 7, 5, 5), (as_t(5), as_t(2), as_t(2),
(5, 2, 2, 3, 3), border_mode) as_t(3), as_t(3)), 'valid')
self.validate(as_t([3, 2, 7, 5, 5]), (5, 2, 2, 3, 3), border_mode) self.validate((3, 2, 7, 5, 5), as_t([5, 2, 2, 3, 3]), border_mode)
self.validate(as_t((3, 2, 7, 5, 5)), (5, 2, 2, 3, 3), border_mode) self.validate(as_t([3, 2, 7, 5, 5]), as_t([5, 2, 2, 3, 3]),
self.validate((3, 2, 7, 5, 5), (as_t(5), as_t(2), as_t(2), border_mode)
as_t(3), as_t(3)), 'valid')
self.validate((3, 2, 7, 5, 5), as_t([5, 2, 2, 3, 3]), border_mode)
self.validate(as_t([3, 2, 7, 5, 5]), as_t([5, 2, 2, 3, 3]), border_mode)
def test_invalid_filter_shape(self): def test_invalid_filter_shape(self):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论