def test_conv3d_invalid(self):
     (x, W, b) = self._get_data(2)
     with self.assertRaises(ValueError):
         F.convolution_3d(x, W, b)
 def test_conv3d(self):
     (x, W, b) = self._get_data(3)
     testing.assert_allclose(
         F.convolution_nd(x, W, b).data, F.convolution_3d(x, W, b).data)
Example #3
0
 def test_conv3d_invalid(self):
     (x, W, b) = self._get_data(2)
     with self.assertRaises(ValueError):
         F.convolution_3d(x, W, b)
def gaussian_filter(img, window, pad, channel):
    x_window, y_window, z_window = window
    h = F.convolution_3d(img, x_window, pad=(0, 0, pad), groups=channel)
    h = F.convolution_3d(h, y_window, pad=(0, pad, 0), groups=channel)
    return F.convolution_3d(h, z_window, pad=(pad, 0, 0), groups=channel)
Example #5
0
 def test_conv3d(self):
     (x, W, b) = self._get_data(3)
     testing.assert_allclose(
         F.convolution_nd(x, W, b).data, F.convolution_3d(x, W, b).data)