-
Notifications
You must be signed in to change notification settings - Fork 295
【Hackathon No.27】为 Paddle 新增 frac 数学计算API #51
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
Conversation
|
PR格式检查通过,你的PR将接受Paddle专家以及开源社区的review,请及时关注PR动态。 |
|
|
||
| ## 命名与参数设计 | ||
|
|
||
| API设计为`paddle.frac(x, name=None)`和tensor.frac(x, name=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tensor.frac(x, name=None)
|
|
||
| # 二、飞桨现状 | ||
|
|
||
| 飞浆目前并无此API,具体实现可由`trunc`和`elementwise_sub`组合实现。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 笔误:飞桨
- 具体实现可由
trunc和elementwise_sub组合实现。是在python端调这两个的C++ OP呢,还是直接用这两个python组合呢?如果后者的话,接口是paddle.subtract,也可以直接用-。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
调用了C++OP,elementwise_sub调用的是_elementwise_op与_elementwise_op_in_dygraph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,那可以明确说一下是在python端调用C++ Op实现。
|
|
||
| ## API实现方案 | ||
|
|
||
| 使用`trunc`与`elementwise_sub`组合实现,实现位置为`paddle/tensor/math.py`与`sum`,`nansum`等方法放在一起: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该和trunc放在一起
|
你的PR有最新反馈,请及时修改。 |
|
已修改完毕 |
luotao1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
你的PR已合入community库,请进行后续代码开发,并将代码提交至Paddle仓库。 |
为 Paddle 新增 frac 数学计算API