Skip to content

Commit

Permalink
dilation fixed for (1, 1) case (dmlc#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurawly authored and tqchen committed May 11, 2018
1 parent 5363259 commit 6eb04ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/nnvm/top/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6eb04ae

Please sign in to comment.