Skip to content

Commit

Permalink
[NNVM][FRONTEND][ONNX] Fix PReLU conversion (#3813)
Browse files Browse the repository at this point in the history
  • Loading branch information
golunovas authored and jroesch committed Sep 1, 2019
1 parent d08c74c commit c1c7b9b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions nnvm/python/nnvm/frontend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ class Prelu(OnnxOpConverter):
def _impl_v1(cls, inputs, attr, params):
assert len(inputs) == 2, "Prelu need 2 inputs, {} given".format(
len(inputs))
channels = infer_channels(inputs[1], params, False)
if channels == 1:
return inputs[0] * inputs[1]
return _sym.broadcast_mul(inputs[0], inputs[1])
return _sym.prelu(inputs[0], inputs[1])


class Reciprocal(OnnxOpConverter):
Expand Down

0 comments on commit c1c7b9b

Please sign in to comment.