Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【PaddlePaddle Hackathon】在Paddle2ONNX 新增11个 Paddle 2.0 API 支持 #362

Merged
merged 8 commits into from
Oct 9, 2021

Conversation

AndPuQing
Copy link
Contributor

@AndPuQing AndPuQing commented Oct 3, 2021

PR types :New features

Describe:

Task: #344

在Paddle2ONNX 新增11个 Paddle 2.0 API 支持

11个API具体为:

  • paddle.log10(x, name=None)
  • paddle.log1p(x, name=None)
  • paddle.logical_xor(x, y, out=None, name=None)
  • paddle.nn.LogSigmoid(name=None)
  • paddle.all(x, axis=None, keepdim=False, name=None)
  • paddle.any(x, axis=None, keepdim=False, name=None)
  • paddle.round(x, name=None)
  • paddle.rsqrt(x, name=None)
  • paddle.nn.functional.selu(x, scale=1.0507, alpha=1.67326, name=None)
  • paddle.sign(x, name=None)
  • paddle.sin(x, name=None)

paddle2onnx/op_mapper/activation.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/logic.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
paddle2onnx/op_mapper/activation.py Outdated Show resolved Hide resolved
@yeliang2258
Copy link
Collaborator

yeliang2258 commented Oct 8, 2021 via email

@AndPuQing
Copy link
Contributor Author

直接实现7以上的版本吧

---原始邮件--- 发件人: @.> 发送时间: 2021年10月8日(周五) 晚上10:04 收件人: @.>; 抄送: @.@.>; 主题: Re: [PaddlePaddle/Paddle2ONNX] 【PaddlePaddle Hackathon】在Paddle2ONNX 新增11个 Paddle 2.0 API 支持 (#362) @AndPuQing commented on this pull request. In paddle2onnx/op_mapper/math.py: > + + @classmethod + def opset_1(cls, graph, node, kw): + ten = graph.make_node( + 'Constant', attrs={ + 'dtype': dtypes.ONNX.FLOAT, + 'value': [10] + }) + ln2 = graph.make_node('Log', inputs=[ten]) + lnx = graph.make_node('Log', inputs=node.input('X')) + graph.make_node('Div', inputs=[lnx, ln2], outputs=node.output('Out')) + + @.*_mapper('log1p') +class Log1p(): + support_opset_verision_range = (7, 12) 尝试更低版本时,返回 NOT_IMPLEMENTED : Could not find an implementation for Add(1) node with name 'Add_0' — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

paddle2onnx/op_mapper/math.py Outdated Show resolved Hide resolved
@jiangjiajun
Copy link
Collaborator

Thanks for your contribution!

@jiangjiajun jiangjiajun merged commit d81df05 into PaddlePaddle:develop Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants