From ec367659973a8ed35d045dad90e4b2498f6a9bcb Mon Sep 17 00:00:00 2001 From: Channingss Date: Tue, 25 Aug 2020 17:52:55 +0800 Subject: [PATCH] fix bug of hard_swish --- x2paddle/op_mapper/paddle2onnx/opset9/opset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py index c79bedf..ce50628 100644 --- a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py +++ b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py @@ -853,8 +853,9 @@ class OpSet9(object): node0 = helper.make_node( 'Add', inputs=[op.input('X')[0], offset_name], outputs=[name0]) name1 = self.get_name(op.type, 'relu') - min_value = op.attr('min') - max_value = op.attr('max') + min_value = 0.0 + max_value = op.attr('threshold') + node1 = helper.make_node( 'Clip', inputs=[name0], -- GitLab