From 2122a28e1a1bb87a6a629ee8d8cdae6253e1cf97 Mon Sep 17 00:00:00 2001 From: "wangnan39@huawei.com" Date: Wed, 15 Apr 2020 17:44:05 +0800 Subject: [PATCH] fix bug in tests of vm conv2d --- tests/vm_impl/vm_me.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm_impl/vm_me.py b/tests/vm_impl/vm_me.py index a189aa8b90d..da7fc1ecbe3 100644 --- a/tests/vm_impl/vm_me.py +++ b/tests/vm_impl/vm_me.py @@ -161,7 +161,7 @@ def col2im(col, input_shape, filter_h, filter_w, stride=1, pad=0): elif isinstance(stride, tuple) and len(stride) == 2: stride_h = stride[0] stride_w = stride[1] - elif isinstance(stride, tuple) and len(stride) == 3: + elif isinstance(stride, tuple) and len(stride) == 4: stride_h = stride[2] stride_w = stride[3] else: @@ -328,7 +328,7 @@ def im2col(img, filter_h, filter_w, stride=1, pad=0, dilation=1): elif isinstance(stride, tuple) and len(stride) == 2: stride_h = stride[0] stride_w = stride[1] - elif isinstance(stride, tuple) and len(stride) == 3: + elif isinstance(stride, tuple) and len(stride) == 4: stride_h = stride[2] stride_w = stride[3] else: @@ -340,7 +340,7 @@ def im2col(img, filter_h, filter_w, stride=1, pad=0, dilation=1): elif isinstance(dilation, tuple) and len(dilation) == 2: dilation_h = dilation[0] dilation_w = dilation[1] - elif isinstance(dilation, tuple) and len(dilation) == 3: + elif isinstance(dilation, tuple) and len(dilation) == 4: dilation_h = dilation[2] dilation_w = dilation[3] else: