From 422412a0d4ae84a576a21479e907eb26ac62a93b Mon Sep 17 00:00:00 2001 From: channingss Date: Tue, 22 Sep 2020 14:15:49 +0800 Subject: [PATCH] [paddle2onnx] add prelu --- x2paddle/op_mapper/paddle2onnx/opset9/opset.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py index 0cec86f..83931f3 100644 --- a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py +++ b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py @@ -110,6 +110,13 @@ class OpSet9(object): 'Relu', inputs=op.input('X'), outputs=op.output('Out')) return node + def prelu(self, op, block): + node = helper.make_node( + 'PRelu', + inputs=[op.input('X')[0], op.input('Alpha')[0]], + outputs=op.output('Out')) + return node + def tanh(self, op, block): node = helper.make_node( 'Tanh', inputs=op.input('X'), outputs=op.output('Out')) -- GitLab