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 5th No.10】 为 Paddle 新增 bernoulli_ / log_normal_ / log_normal API #618

Merged
merged 7 commits into from Oct 11, 2023

Conversation

PommesPeter
Copy link
Contributor

@PommesPeter PommesPeter commented Sep 13, 2023

@paddle-bot
Copy link

paddle-bot bot commented Sep 13, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@Ligoml Ligoml changed the title 【Hackathon 5】added log_normal rfc doc 【Hackathon No.10】 为 Paddle 新增 log_normal API Sep 14, 2023
@Ligoml Ligoml changed the title 【Hackathon No.10】 为 Paddle 新增 log_normal API 【Hackathon 5th No.10】 为 Paddle 新增 log_normal API Sep 14, 2023
Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

API分开来写,一共三个API,其中依赖的 normal_ 内部正在开发中

rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
rfcs/APIs/20230914_api_design_for_log_normal.md Outdated Show resolved Hide resolved
@PommesPeter PommesPeter changed the title 【Hackathon 5th No.10】 为 Paddle 新增 log_normal API 【Hackathon 5th No.10】 为 Paddle 新增 bernoulli_ / log_normal_ / log_normal API Sep 17, 2023

考虑到 `Paddle` 本身已经实现 `paddle.uniform_`,本方案考虑使用 Python API 实现。

使用 `paddle.uniform_` 生成一个正态分布,随后将正态分布中小于 `p` 的部分,生成对应的 mask 矩阵,与原 tensor 进行索引。
Copy link
Contributor

Choose a reason for hiding this comment

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

注意需要组合连续的inplace,后面的inplace api目前都有没有

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit 4d16f65 into PaddlePaddle:master Oct 11, 2023
1 check passed
yangguohao pushed a commit to yangguohao/community that referenced this pull request Oct 22, 2023
…al API (PaddlePaddle#618)

* added log_normal rfc doc

* updated bernoulli_ and log_normal rfc doc

* updated bernoulli_ rfc doc

* updated title of rfc

* updated title of rfc

* updated rfc doc

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

Successfully merging this pull request may close these issues.

None yet

3 participants