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.19】Add ContinuousBernoulli and MultivariateNormal API #6392

Merged
merged 7 commits into from
Dec 18, 2023

Conversation

NKNaN
Copy link
Contributor

@NKNaN NKNaN commented Dec 13, 2023

add cn docs

Copy link

paddle-bot bot commented Dec 13, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6392.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@luotao1 luotao1 added the PaddlePaddle Hackathon 飞桨黑客松活动issue与PR label Dec 14, 2023
ContinuousBernoulli
-------------------------------

.. py:class:: paddle.distribution.ContinuousBernoulli(probs, eps=0.02)
Copy link
Collaborator

Choose a reason for hiding this comment

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

eps=0.02 这是啥,参数不是只有 probs 和 lims 吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

早上忘改了(
已修改


**参数**

- **value** (Tensor) - 待计算值。
Copy link
Collaborator

Choose a reason for hiding this comment

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

方法 下的参数返回的写法样式统一一下吧,MultivariateNormal 同理
image
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改


- **loc** (int|float|Tensor) - 即上述公式中 :math:`\mu` 参数,是 MultivariateNormal 的均值向量。如果 :attr:`loc` 的输入数据类型是 `int` 或 `float` 则会被转换为数据类型为 paddle 全局默认数据类型的 1-D Tensor。

- **covariance_matrix** (Tensor) - 即上述公式中 :math:`\mu` 参数,是 MultivariateNormal 的协方差矩阵。:attr:`covariance_matrix` 的数据类型会被转换为与 :attr:`loc` 相同的类型。
Copy link
Collaborator

Choose a reason for hiding this comment

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

有默认值的参数需要说明默认值

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

sunzhongkai588

This comment was marked as outdated.

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

有默认参数的需要在描述里加 可选

docs/api/paddle/distribution/MultivariateNormal_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/distribution/ContinuousBernoulli_cn.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 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 532b063 into PaddlePaddle:develop Dec 18, 2023
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor PaddlePaddle Hackathon 飞桨黑客松活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants