From c1c7b9b19b56a992b85fc26c3d3c490473938998 Mon Sep 17 00:00:00 2001 From: Alexey Golunov Date: Sun, 1 Sep 2019 03:52:42 +0300 Subject: [PATCH] [NNVM][FRONTEND][ONNX] Fix PReLU conversion (#3813) --- nnvm/python/nnvm/frontend/onnx.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nnvm/python/nnvm/frontend/onnx.py b/nnvm/python/nnvm/frontend/onnx.py index 7d978739853f..8a92821476a5 100644 --- a/nnvm/python/nnvm/frontend/onnx.py +++ b/nnvm/python/nnvm/frontend/onnx.py @@ -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):