提交 c749e68e authored 作者: sentient07's avatar sentient07

Fixed few errors generated from Dilation PR

上级 a668c6c5
......@@ -26,7 +26,7 @@ class TestDnnConv2d(test_abstract_conv.BaseTestConv2d):
raise SkipTest(dnn_available.msg)
mode = mode_with_gpu
o = self.get_output_shape(i, f, s, b)
o = self.get_output_shape(i, f, s, b, (1,1))
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 not filter_dilation:
filter_dilation = numpy.ones(numpy.asarray(subsample).shape, dtype='int')
if isinstance(border_mode, tuple):
out_shp = tuple(get_conv_shape_1axis(
imshp[i], kshp[i], border_mode[i],
......
......@@ -296,7 +296,7 @@ class BaseTestConv2d(unittest.TestCase):
for b in self.border_modes:
try:
self.tcase(i, f, s, db, dflip,
dprovide_shape, fd)
dprovide_shape)
except SkipTest as e:
skipped = e
for flip in self.filter_flip:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论