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

[Hackathon No.18] 新增frexp api #45546

Closed
wants to merge 14 commits into from
Closed

[Hackathon No.18] 新增frexp api #45546

wants to merge 14 commits into from

Conversation

Zheng-Bicheng
Copy link
Contributor

@Zheng-Bicheng Zheng-Bicheng commented Aug 30, 2022

PR types

New features

PR changes

APIs

Describe

新增frexp api
提案:PaddlePaddle/community#214
中文文档:PaddlePaddle/docs#5276

@Zheng-Bicheng
Copy link
Contributor Author

提案链接

Copy link
Member

@tizhou86 tizhou86 left a 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

@Zheng-Bicheng
Copy link
Contributor Author

请在python/paddle/init.py中也添加api声明,可以参考这个:https://github.com/PaddlePaddle/Paddle/pull/44853/files#diff-dd4ce82a4831b8c3f62aa1717373fce4dd62e1f42540bc8395df5e3c447a0475 ,然后再过一下ci

已经按照您的要求进行了修改,您再看一下

@Zheng-Bicheng
Copy link
Contributor Author

请在python/paddle/init.py中也添加api声明,可以参考这个:https://github.com/PaddlePaddle/Paddle/pull/44853/files#diff-dd4ce82a4831b8c3f62aa1717373fce4dd62e1f42540bc8395df5e3c447a0475 ,然后再过一下ci

还需要做什么改进嘛

@Zheng-Bicheng
Copy link
Contributor Author

请在python/paddle/init.py中也添加api声明,可以参考这个:https://github.com/PaddlePaddle/Paddle/pull/44853/files#diff-dd4ce82a4831b8c3f62aa1717373fce4dd62e1f42540bc8395df5e3c447a0475 ,然后再过一下ci

有时间能帮忙再看一下吗

@tizhou86
Copy link
Member

LGTM

@Zheng-Bicheng
Copy link
Contributor Author

PaddlePaddle/docs#5276

@Zheng-Bicheng
Copy link
Contributor Author

LGTM

两份文档都补充完成了,您看一下

Args:
x (Tensor): The input tensor, which data type should be float32, float64.

Returns:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返回值是一个list还是两个Tensor呢?看示例代码是list,但是这里的描述是两个独立的Tensor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经修复,应该是一个元组,下意识写成列表了

import paddle

x = paddle.to_tensor([[1,2,3,4]])
print(paddle.sgn(x))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgn?

Copy link
Contributor Author

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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数是否需要增加name呢?@tizhou86

@Zheng-Bicheng Zheng-Bicheng closed this by deleting the head repository Sep 22, 2022
@paddle-bot
Copy link

paddle-bot bot commented Sep 22, 2022

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants