提交 aaa59e03 authored 作者: theano-bot's avatar theano-bot 提交者: GitHub

Merge pull request #4696 from Sentient07/dilation_cleanup

Fixed few errors generated from Dilation PR
......@@ -21,12 +21,13 @@ class TestDnnConv2d(test_abstract_conv.BaseTestConv2d):
# provide_shape is not used by the cuDNN impementation
self.provide_shape = [False]
def tcase(self, i, f, s, b, flip, provide_shape):
def tcase(self, i, f, s, b, flip, provide_shape, fd=(1, 1)):
if not dnn_available(test_ctx_name):
raise SkipTest(dnn_available.msg)
mode = mode_with_gpu
o = self.get_output_shape(i, f, s, b)
if fd != (1, 1):
raise SkipTest("Doesn't have CUDNN implementation")
o = self.get_output_shape(i, f, s, b, fd)
self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s,
verify_grad=True, mode=mode,
provide_shape=provide_shape, border_mode=b,
......
......@@ -33,7 +33,7 @@ _logger = logging.getLogger("theano.tensor.nnet.abstract_conv")
def get_conv_output_shape(image_shape, kernel_shape,
border_mode, subsample,
filter_dilation=(1, 1)):
filter_dilation=None):
"""
This function compute the output shape of convolution operation.
......@@ -66,6 +66,8 @@ def get_conv_output_shape(image_shape, kernel_shape,
"""
bsize, imshp = image_shape[0], image_shape[2:]
nkern, kshp = kernel_shape[0], kernel_shape[2:]
if filter_dilation is None:
filter_dilation = numpy.ones(len(subsample), dtype='int')
if isinstance(border_mode, tuple):
out_shp = tuple(get_conv_shape_1axis(
imshp[i], kshp[i], border_mode[i],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论