!357 fix bug in tests of vm conv2d

Merge pull request !357 from wangnan39/fix_bug_in_tests_of_vm
This commit is contained in:
mindspore-ci-bot 2020-04-15 18:59:33 +08:00 committed by Gitee
commit eaa4186ba3
1 changed files with 3 additions and 3 deletions

View File

@ -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: