Skip to content

Commit

Permalink
More fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wweic committed Mar 1, 2019
1 parent 724bb26 commit 44c2510
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nnvm/python/nnvm/top/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ def compute_conv2d(attrs, inputs, _):
else:
raise ValueError("not support arbitrary group number for now")

if attrs.get_bool("use_bias"):
bias = inputs[2]
expand_axis = 1 if layout == "NCHW" else 0
bias = topi.expand_dims(bias, axis=expand_axis, num_newaxis=2)
out = topi.add(out, bias)
return out

@reg.register_schedule("conv2d")
def schedule_conv2d(attrs, outs, target):
"""Schedule definition of conv2d"""
Expand Down

0 comments on commit 44c2510

Please sign in to comment.