From b98a83a8500a7a38db218296db07dafc2a11ba6a Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 16 Jul 2020 21:24:06 -0500 Subject: [PATCH] [TOPI] Fix the filter width parameter in depthwise_conv2d (#6081) * [TOPI] Fix the filter width parameter in depthwise_conv2d * Retrigger build Co-authored-by: Venkat Rasagna Reddy Komatireddy --- topi/python/topi/testing/depthwise_conv2d_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topi/python/topi/testing/depthwise_conv2d_python.py b/topi/python/topi/testing/depthwise_conv2d_python.py index 5addc7578d10..a541bea920d4 100644 --- a/topi/python/topi/testing/depthwise_conv2d_python.py +++ b/topi/python/topi/testing/depthwise_conv2d_python.py @@ -58,7 +58,7 @@ def depthwise_conv2d_python_nchw(input_np, filter_np, stride, padding): for j in range(out_channel): output_np[i, j, :, :] = signal.convolve2d(input_np[i, j//channel_multiplier, :, :], \ np.rot90(filter_np[j//channel_multiplier, j%channel_multiplier, :, :], 2), \ - mode='valid')[0:(in_height - filter_height + 1):stride_h, 0:(in_width - filter_height + 1):stride_w] + mode='valid')[0:(in_height - filter_height + 1):stride_h, 0:(in_width - filter_width + 1):stride_w] if padding == 'SAME': out_channel = in_channel * channel_multiplier out_height = np.int(np.ceil(float(in_height) / float(stride_h))) @@ -119,7 +119,7 @@ def depthwise_conv2d_python_nhwc(input_np, filter_np, stride, padding): for j in range(out_channel): output_np[i, :, :, j] = signal.convolve2d(input_np[i, :, :, j//channel_multiplier], \ np.rot90(filter_np[:, :, j//channel_multiplier, j%channel_multiplier], 2), \ - mode='valid')[0:(in_height - filter_height + 1):stride_h, 0:(in_width - filter_height + 1):stride_w] + mode='valid')[0:(in_height - filter_height + 1):stride_h, 0:(in_width - filter_width + 1):stride_w] if padding == 'SAME': out_channel = in_channel * channel_multiplier out_height = np.int(np.ceil(float(in_height) / float(stride_h)))