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

新增随机变量变换相关API中文文档 #4642

Merged
merged 8 commits into from
Apr 22, 2022

Conversation

cxxly
Copy link
Contributor

@cxxly cxxly commented Apr 14, 2022

新增随机变量变换相关16个API中文文档

@paddle-bot-old
Copy link

Thanks for your contribution!

@cxxly cxxly force-pushed the distribution branch 4 times, most recently from 1e940dc to 118df85 Compare April 19, 2022 08:26
AbsTransform
-------------------------------

.. py:class:: paddle.distribution.Transform
Copy link
Collaborator

Choose a reason for hiding this comment

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

Transform -> AbsTransform()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

ExpTransform
-------------------------------

.. py:class:: paddle.distribution.ExpTransform
Copy link
Collaborator

Choose a reason for hiding this comment

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

ExpTransform -> ExpTransform()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

.. py:class:: paddle.distribution.IndependentTransform(base, reinterpreted_batch_rank)


``IndependentTransform`` 将一个基础变换 ``base`` 的部分批(batch)维
Copy link
Collaborator

Choose a reason for hiding this comment

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

换行会带来空格,所以尽量写在一行里,或者在标点符号的时候进行换行
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.

updated


``Multinomial`` 表示实验次数为 ``total_count`` ,概率为 ``probs`` 的多项分布。

在概率论中,多项分布是二项分布的多元推广,表示具有 :math:`k` 个类别的事件重复实验 :math:`n`
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.

updated



其中, :math:`n` 表示实验次数, :math:`k` 表示类别数, :math:`p_i` 表示一次实验中,实验结果
为第 :math:`i` 个类比的概率,需要满足 :math:`{\textstyle \sum_{i=1}^{k}p_i=1}, p_i \ge 0` ,
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.

updated

.. py:class:: paddle.distribution.StickBreakingTransform

``StickBreakingTransform`` 将一个长度为K的向量通过StackBreaking构造过程变换为标准K-单纯
形。
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.

updated

StickBreakingTransform
-------------------------------

.. py:class:: paddle.distribution.StickBreakingTransform
Copy link
Collaborator

Choose a reason for hiding this comment

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

StickBreakingTransform -> StickBreakingTransform()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

TanhTransform
-------------------------------

.. py:class:: paddle.distribution.TanhTransform
Copy link
Collaborator

Choose a reason for hiding this comment

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

TanhTransform -> TanhTransform()



代码示例
:::::::::
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里是 ExpTransform 这个的示例代码,可以用 COPY: FROM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Transform
-------------------------------

.. py:class:: paddle.distribution.Transform
Copy link
Collaborator

Choose a reason for hiding this comment

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

Transform -> Transform()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@TCChenlong TCChenlong merged commit 4467874 into PaddlePaddle:develop Apr 22, 2022
cxxly added a commit to cxxly/docs that referenced this pull request Apr 22, 2022
* add paddle.distribution.Transform chinese document

* add paddle.distribution.AbsTransform chinese document

* add paddle.distribution.AffineTransform chinese document

* add ChainTransform,ExpTransform,IndependentTransform chinese document

* add PowerTransform,ReshapeTransform chinese document

* add SigmoidTransform,SoftmaxTransform,StackTransform,StickBreakingTransform,TanhTransform chinese documents

* add Independent,Multinomial,TransformedDistribution chinese documents

* fix transform's APIs format problem
TCChenlong pushed a commit that referenced this pull request Apr 24, 2022
* add paddle.distribution.Transform chinese document

* add paddle.distribution.AbsTransform chinese document

* add paddle.distribution.AffineTransform chinese document

* add ChainTransform,ExpTransform,IndependentTransform chinese document

* add PowerTransform,ReshapeTransform chinese document

* add SigmoidTransform,SoftmaxTransform,StackTransform,StickBreakingTransform,TanhTransform chinese documents

* add Independent,Multinomial,TransformedDistribution chinese documents

* fix transform's APIs format problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants