Commit 2864fe4e by Leyuan Wang Committed by Tianqi Chen

dilation fixed for (1, 1) case (#477)

parent d4768204
......@@ -88,6 +88,8 @@ def compute_conv2d(attrs, inputs, _):
(dilation_h, dilation_w) = dilation
if dilation_h < 1 or dilation_w < 1:
raise ValueError("dilation should be positive value")
elif dilation == (1, 1):
kernel = inputs[1]
elif layout == "NCHW":
kernel = topi.nn.dilate(inputs[1], [1, 1, dilation_h, dilation_w])
else: #layout == NHWC
......
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