Skip to content

Commit 3daa5b5

Browse files
golunovaswweic
authored andcommitted
[NNVM][FRONTEND][ONNX] Fix PReLU conversion (apache#3813)
1 parent c78ee80 commit 3daa5b5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

nnvm/python/nnvm/frontend/onnx.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,7 @@ class Prelu(OnnxOpConverter):
307307
def _impl_v1(cls, inputs, attr, params):
308308
assert len(inputs) == 2, "Prelu need 2 inputs, {} given".format(
309309
len(inputs))
310-
channels = infer_channels(inputs[1], params, False)
311-
if channels == 1:
312-
return inputs[0] * inputs[1]
313-
return _sym.broadcast_mul(inputs[0], inputs[1])
310+
return _sym.prelu(inputs[0], inputs[1])
314311

315312

316313
class Reciprocal(OnnxOpConverter):

0 commit comments

Comments
 (0)