提交 07eb476b authored 作者: nouiz's avatar nouiz

Merge pull request #3 from dwf/check_conv_const_shape_gpu

Spelling + spacing fixes
......@@ -84,7 +84,7 @@ CudaNdarray_conv_valid(const CudaNdarray *img, const CudaNdarray * kern,
const int out_size_byte = out_size*sizeof(float);
if (!((THEANO_KERN_WID == CudaNdarray_HOST_DIMS(kern)[3]) || (THEANO_KERN_WID==0))){
PyErr_Format(PyExc_ValueError, "ERROR: This GpuConv code was compiled for"
" %d kernel columns, but the kernel we received had %d colums!",
" %d kernel columns, but the kernel we received had %d columns!",
THEANO_KERN_WID, CudaNdarray_HOST_DIMS(kern)[3]);
return -1;
}
......@@ -768,7 +768,7 @@ CudaNdarray_conv_full(const CudaNdarray *img, const CudaNdarray * kern, CudaNdar
if (!((THEANO_KERN_WID == CudaNdarray_HOST_DIMS(kern)[3]) || (THEANO_KERN_WID==0))){
PyErr_Format(PyExc_ValueError, "ERROR: This GpuConv code was compiled for"
" %d kernel columns, but the kernel we received had %d colums!",
" %d kernel columns, but the kernel we received had %d columns!",
THEANO_KERN_WID, CudaNdarray_HOST_DIMS(kern)[3]);
return -1;
}
......
......@@ -559,7 +559,7 @@ def test_full():
def test_subsample():
# implement when
shapes = [
shapes = [
((1, 1, 1, 1), (1, 1, 1, 1), (1,1), (1,1), (1,1))
, ((1, 1, 1, 1), (1, 1, 1, 1), (2,2), (1,1), (1,1))
, ((4, 2, 10, 10), (3, 2, 2, 2), (1, 3), (1,1), (1,1))
......@@ -580,7 +580,7 @@ def test_subsample():
ones = False
if ones:
random = False
exec_conv(version_valid, shapes, verbose, random, 'valid', print_=print_, ones=ones)
exec_conv(version_full, shapes, verbose, random, 'full', print_=print_, ones=ones)
......@@ -609,9 +609,10 @@ class TestConv2DGPU(unittest.TestCase):
if theano.config.mode in ['DebugMode', 'DEBUG_MODE']:
theano_mode = theano.compile.mode.get_mode('FAST_RUN').including('gpu')
for mode in ['valid', 'full']:
for shapes in [((3,2,8,8), (4,2,5,5), (8,8)),
((3,2,8,8), (4,2,5,5), (5,8)),
#((3,2,8,8), (4,2,5,5), (8,5)),# We use only the number of columns.
for shapes in [((3, 2, 8, 8), (4, 2, 5, 5), (8, 8)),
((3, 2, 8, 8), (4, 2, 5, 5), (5, 8)),
#((3, 2, 8, 8), (4, 2, 5, 5), (8, 5)),
# We use only the number of columns.
]:
self.assertRaises(ValueError, _params_allgood, shapes[0], shapes[1],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论