From 08a7b1ded7cd7c1b021c06f3dcf427dd9c3a71d9 Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Wed, 18 Oct 2017 19:28:15 +0800 Subject: [PATCH] fix unit test --- python/paddle/v2/framework/tests/test_conv3d_op.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/framework/tests/test_conv3d_op.py b/python/paddle/v2/framework/tests/test_conv3d_op.py index 4e12b1a0c89..010217cbf87 100644 --- a/python/paddle/v2/framework/tests/test_conv3d_op.py +++ b/python/paddle/v2/framework/tests/test_conv3d_op.py @@ -65,6 +65,7 @@ class TestConv3dOp(OpTest): self.check_grad( set(['Input', 'Filter']), 'Output', max_relative_error=0.05) + def test_check_grad_no_filter(self): self.check_grad( ['Input'], 'Output', @@ -81,7 +82,7 @@ class TestConv3dOp(OpTest): def init_test_case(self): self.pad = [0, 0, 0] self.stride = [1, 1, 1] - self.input_size = [2, 3, 5, 5, 5] # NCDHW + self.input_size = [2, 3, 4, 4, 4] # NCDHW assert np.mod(self.input_size[1], self.groups) == 0 f_c = self.input_size[1] / self.groups self.filter_size = [6, f_c, 3, 3, 3] @@ -97,7 +98,7 @@ class TestCase1(TestConv3dOp): def init_test_case(self): self.pad = [1, 1, 1] self.stride = [1, 1, 1] - self.input_size = [2, 3, 5, 5, 5] # NCDHW + self.input_size = [2, 3, 4, 4, 4] # NCDHW assert np.mod(self.input_size[1], self.groups) == 0 f_c = self.input_size[1] / self.groups self.filter_size = [6, f_c, 3, 3, 3] -- GitLab