Commit 38203a86 by Wuwei Lin Committed by Yizhi Liu

Fix incorrect stride in conv2d_nhwc_python (#1670)

parent ea014176
...@@ -63,5 +63,5 @@ def conv2d_nhwc_python(a_np, w_np, stride, padding): ...@@ -63,5 +63,5 @@ def conv2d_nhwc_python(a_np, w_np, stride, padding):
apad = at[n, c] apad = at[n, c]
out = scipy.signal.convolve2d( out = scipy.signal.convolve2d(
apad, np.rot90(np.rot90(wt[f, c])), mode='valid') apad, np.rot90(np.rot90(wt[f, c])), mode='valid')
bt[n, f] += out[::stride, ::stride] bt[n, f] += out[::stride_h, ::stride_w]
return bt.transpose((0, 2, 3, 1)) return bt.transpose((0, 2, 3, 1))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment