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.8】为 Paddle 新增 Gumbel API #254

Merged
merged 7 commits into from Sep 16, 2022

Conversation

PureNatural
Copy link
Contributor

PaddlePaddle Hackathon 第三期 No.8 新增Gumbel分布API

@paddle-bot
Copy link

paddle-bot bot commented Sep 12, 2022

你的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.

@CLAassistant
Copy link

CLAassistant commented Sep 12, 2022

CLA assistant check
All committers have signed the CLA.

# 六、测试和验收的考量
`GumbelTest`继承`unittest.TestCase`类中的方法,参考NormalTest的示例,新增一个`GumbelNumpy`类来验证`Gumbel` API的正确性。
- 使用相同的参数实例化 `Gumbel` 类和 `GumbelNumpy` 类,分别调用 `mean`、`variance`、`stddev`、`prob`、`log_prob`、`entropy`方法。将输出的结果进行对比,允许有一定的误差。
- 使用sample方法对多个样本进行测试。
Copy link

Choose a reason for hiding this comment

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

考虑并补充样本测试方法,即生成的样本是否真实满足Gmbel分布,如常用KS检验、直方图检验等

Copy link
Contributor Author

Choose a reason for hiding this comment

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

感谢您提出的宝贵建议。

Copy link

@cxxly cxxly left a comment

Choose a reason for hiding this comment

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

LGTM

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

6 participants