-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Hackathon No.18] 新增frexp api #45546
Conversation
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/paddle/init.py中也添加api声明,可以参考这个:https://github.com/PaddlePaddle/Paddle/pull/44853/files#diff-dd4ce82a4831b8c3f62aa1717373fce4dd62e1f42540bc8395df5e3c447a0475 ,然后再过一下ci
已经按照您的要求进行了修改,您再看一下 |
还需要做什么改进嘛 |
有时间能帮忙再看一下吗 |
LGTM |
两份文档都补充完成了,您看一下 |
Args: | ||
x (Tensor): The input tensor, which data type should be float32, float64. | ||
|
||
Returns: |
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.
返回值是一个list还是两个Tensor呢?看示例代码是list,但是这里的描述是两个独立的Tensor?
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/paddle/tensor/math.py
Outdated
import paddle | ||
|
||
x = paddle.to_tensor([[1,2,3,4]]) | ||
print(paddle.sgn(x)) |
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.
sgn?
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.
已经修复
@@ -4819,6 +4819,45 @@ def sgn(x, name=None): | |||
else: | |||
return paddle.sign(x) | |||
|
|||
|
|||
def frexp(x): |
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.
参数是否需要增加name呢?@tizhou86
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
New features
PR changes
APIs
Describe
新增frexp api
提案:PaddlePaddle/community#214
中文文档:PaddlePaddle/docs#5276