-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 3 No.9】为 Paddle 新增 Laplace API #44913
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
|
解决CI失败中问题 |
修改PR标题,一句话描述清楚你的工作 |
参考 |
loc, scale, uniform = paddle.broadcast_tensors( | ||
[self.loc, self.scale, uniform]) | ||
else: | ||
loc, scale = self.loc, self.scale |
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.
建议不用显示broadcast,加减乘除等Paddle一些基本运算支持Broadcast语义
这个不太好直接判断,不排除Paddle OP本身可能存在缺陷,需要Debug。 建议 另外,我在linux机器上没有复现,是只有Windows存在上述问题吗?自己先尝试定位问题,如果无法定位或问题解决不了,再进一步交流 |
感谢@cxxly。我这边debug了一下, |
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
英文API文档的部分需要和中文部分对齐哈,现在缺少了公式和name参数的介绍 |
Done. |
|
||
.. math:: | ||
|
||
log\_prob(value) = \frac{-log(2 * \sigma) - |value - \mu|}{\sigma} |
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.
Tensor: The log probability, whose data type is same with value. | ||
|
||
Examples: | ||
.. code-block:: python |
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.
|
||
.. math:: | ||
|
||
cdf(value) = 0.5 - 0.5 * sign(value - \mu) * e^\frac{-|(\mu - \sigma)|}{\sigma} |
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.
LGTM for docs
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
…44913) * 增加ks-test;注册kl_divergence * bug fix * bug fix data shape * 按要求修改 * sample code fix * 按要求修改 * bugfix * bugfix * bugfix * bugfix * bugfix * fix sample func * fix sample func * 按要求修改;sample函数bugfix * 按要求修改;sample函数bugfix * bugfix * 补充英文文档公式 * 英文文档bugfix * bugfix * bugfix * 英文文档修复 * 去除name参数
PR types
New features
PR changes
APIs
Describe
新增laplace分布api;历史commit: #44579 (comment)
设计文档:PaddlePaddle/community#190 (comment)
中文api文档:PaddlePaddle/docs#5214