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 2】8、为 Paddle 新增 nanmean API #40327

Closed
TCChenlong opened this issue Mar 8, 2022 · 5 comments
Closed

【PaddlePaddle Hackathon 2】8、为 Paddle 新增 nanmean API #40327

TCChenlong opened this issue Mar 8, 2022 · 5 comments

Comments

@TCChenlong
Copy link
Contributor

TCChenlong commented Mar 8, 2022

(此 ISSUE 为 PaddlePaddle Hackathon 第二期活动的任务 ISSUE,更多详见 【PaddlePaddle Hackathon 第二期】任务总览

【任务说明】

任务标题:为 Paddle 新增 nanmean API

技术标签:深度学习框架,Python

任务难度:简单

详细描述:paddle.nanmean 扩展了 paddle.mean API 的功能,如果输入Tensor中有nan值, paddle.mean在计算中会将涉及nan值的结果都置为nan,而 paddle.nanmean 会跳过nan值。比如输入数据 x = [[nan, 1. , 2. ], [3. , 4. , 5. ]],x.mean() 得到 [nan],x.mean(0) 得到 [nan, 2.5, 3.5],x.nanmean() 得到 [3.],x.nanmean(0) 得到 [3., 2.5, 3.5]。此API需支持的调用路径为:paddle.nanmean 和 Tensor.nanmean 。

【提交流程】

请按 新增API 开发&提交流程中的描述,完成任务提交过程中的相关步骤。

【提交内容】

【合入标准】

【技术要求】

  • 熟悉 paddle.nansum,paddle.isnan,paddle.logical_not,paddle.sum 这4个APi的计算逻辑
  • 熟练掌握 Python

【参考内容】

【答疑交流】

  • 如果在开发中对于上述任务有任何问题,欢迎在本 ISSUE 下留言交流。
  • 对于开发中的共性问题,在活动过程中,会定期组织答疑,请大家关注官网&QQ群的通知,及时参与。
@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 8, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@Li-fAngyU
Copy link
Contributor

要和paddle.mean()一样兼容dygraph_mode吗?
paddle.mean源码: https://github.com/PaddlePaddle/Paddle/blob/release/2.2/python/paddle/tensor/stat.py#L30

@livingbody
Copy link

  • paddle.nansum

paddle.nansum这个函数没找到啊

@TCChenlong
Copy link
Contributor Author

要和paddle.mean()一样兼容dygraph_mode吗? paddle.mean源码: https://github.com/PaddlePaddle/Paddle/blob/release/2.2/python/paddle/tensor/stat.py#L30

是的

@TCChenlong
Copy link
Contributor Author

  • paddle.nansum

paddle.nansum这个函数没找到啊

develop 分支下就有

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

No branches or pull requests

4 participants