-
Notifications
You must be signed in to change notification settings - Fork 242
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 4th No.12】 为 paddle 新增 paddle.distribution.Cauchy 分布 #375
Conversation
@luotao1 劳烦给检查一下提案哈哈哈! |
|
||
`Cauchy distribution`的一个重要的特性是其均值和方差都不存在,并且没有高阶矩阵,正是这样的特性,使柯西分布常用于数据分析和贝叶斯统计学中非对称参数分布的情况。 | ||
|
||
目前 Paddle 框架中没有继承 Cauchy 分布。所以此任务的目标是在 Paddle 框架中,基于现有概率分布方案,在其基础上进行扩展,新增 Cauchy API,API 的调用路径为: `paddle.distribution.Cauchy`。 |
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.
没有继承 -> 没有实现;
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.
收到!
|
||
- stddev:标准差 | ||
> 注:Cauchy 分布不存在标准差 | ||
|
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.
需要从概率分布本质上考虑下在Paddle中如何处理,比如抛异常,还是无穷大/无穷小表示
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.
需要从概率分布本质上考虑下在Paddle中如何处理,比如抛异常,还是无穷大/无穷小表示
收到!
```python | ||
def sample(self, shape): | ||
sample(shape) | ||
``` |
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.
rsample(shape)
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.
rsample(shape)
收到!
详细描述了Cauchy背景和应用,竞品分析部分也较为完备,测试用例也能看出来确实下了不少功夫,整体设计文档写的非常不错! |
哈哈哈!非常感谢您的 review ,以及您的夸奖和认可!! |
@cxxly 您上面提出的修改意见都已进行修改,劳烦抽空再给review一下,感谢! |
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.
LGTM
另外,@lwbmowgli 反馈该RFC与 https://github.com/PaddlePaddle/community/pull/362/files 测试用例与排期部分有相似之处,如 "随机采样30000个Cauchy分布下的样本值...",此处应该不能算作抄袭,但是确实借鉴了@lwbmowgli 模版;另外,具体采样点数,是一个经验数字,应该是由实验测试不同采样点数,权衡数值稳定和显存开销,设置一个较为合理的数值。设计文档中应当更具体说明,"此处为借鉴XX经验数字,具体数值根据实验结果修改" 1)请 @dasenCoding对相同的文字描述进行修改,另外参考同行工作,要在相关文档、代码、评论等处进行说明; 开源社区,在尊重别人工作基础上,鼓励大家相互协作,进行共建,希望两位共同努力,加油! |
我参考了第三期黑客松中的RFC内容,并未直接抄袭本期中这位同学的RFC @lwbmowgli,与该RFC相似部分纯属巧合,我会指明参考的工作,避免产生误会。 |
rfc : Cauchy Distribution