提交 f18c8498 authored 作者: Arjun Jain's avatar Arjun Jain

Look what I did on like 117 in file…

Look what I did on like 117 in file theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py. I rotated the kernel by 180 before convolution, and this now gives the same result as GpuConvMM. So, I think the cuda/c part is completely fine and the corrent arguments are being passed to the cublas function.
上级 80dd43ec
......@@ -115,8 +115,8 @@ def py_conv_scipy(img, kern, mode, subsample):
for k in xrange(out.shape[1]):
for s in xrange(img.shape[1]):
out[b, k, :, :] += convolve2d(img[b, s, :, :],
kern[k, s, :, :],
mode)
numpy.rot90(kern[k, s, :, :],2),
mode)
return out[:, :, ::subsample[0], ::subsample[1]]
......@@ -819,7 +819,7 @@ class TestConv2DGPU(unittest.TestCase):
def _test_dummy():
ishape = (1, 1, 5, 5)
ishape = (1, 1, 7, 7)
kshape = (1, 1, 3, 3)
mode = 'valid'
subsample = (1, 1)
......@@ -847,6 +847,7 @@ def _test_dummy():
gpuval = numpy.asarray(gpuval)
print gpuval
print '-------------------'
print cpuval
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论