-
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
Add MultivariateNormal distribution API #47825
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@dasenCoding 请解决下冲突 |
冲突已解决。 |
PR-CI-Codestyle-Check 流水线没有过,请按照提示修改下代码格式。 |
好的,感谢!但api 部分代码还未完成,可能需要完成后再整体修改代码格式。 |
30c925e
to
4552be4
Compare
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR 如果可以 review 了,请@我 |
Coverage流水线中的 |
API 已经完成了,除了您刚才提到的 Coverage,有两个CI 检查没有通过,需要全部通过再进行 review 吗? |
不用,PR-CI-Static-Check是需要approve的,PR-CI-Build-ALLFramework-Compile是非required流水线,可以暂时不用关注。 请 @cxxly 可以帮忙 review 了~ |
好的,谢谢哈! |
@cxxly 麻烦您 review 一下。 |
|
||
def __init__(self, loc, covariance_matrix): | ||
if loc.dim() < 1: | ||
raise ValueError("loc must be at least one-dimensional.") |
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.
len(loc.shape)
if loc.dim() < 1: | ||
raise ValueError("loc must be at least one-dimensional.") | ||
if (covariance_matrix is not None) != 1: | ||
raise ValueError("Exactly covariance_matrix may be specified.") |
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.
if (covariance_matrix is not None) != 1
这句话的语义是? if covariance_matrix is None
?
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.
对,是 if covariance_matrix is None
的意思。
return paddle.reshape(reshaped_M, bx_batch_shape) | ||
|
||
def _extend_shape(self, sample_shape): | ||
"""Compute shape of the sample |
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.
好的。
参考已有分布,补充单测 |
好的。 |
…into multnormal_api
…into multnormal_api
@dasenCoding 请解决下Coverage流水线单测覆盖率不足的问题 |
好的! |
PR types
New features
PR changes
APIs
Describe
新增 MultivariateNormal 分布API
设计文档:PaddlePaddle/community#320
中文api文档:PaddlePaddle/docs#5551