-
Notifications
You must be signed in to change notification settings - Fork 821
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
[Docathon][Add Inplace CN Doc No.9] Create cauchy__cn.rst,Update Overview_cn.rst #7234
base: develop
Are you sure you want to change the base?
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7234.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
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.
劳烦同学修改一下啦~😘
docs/api/paddle/cauchy__cn.rst
Outdated
|
||
.. py:function:: paddle.cauchy_(x: paddle.Tensor, loc: Numeric = 0, scale: Numeric = 1, name: str | None = None) | ||
|
||
使用 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.
使用 Cauchy 分布中的数字填充张量。
描述改为:使用柯西分布(Cauchy distribution)随机数就地(Inplace)填充输入张量 x
。
可以适当增加 Wiki 中对柯西分布的描述,并附加参考链接,形式如 [柯西分布](https://zh.wikipedia.org/wiki/%E6%9F%AF%E8%A5%BF%E5%88%86%E5%B8%83)
paddle 中也有柯西分布相关 api,可以增加说明字段以示区分:cauchy
cauchy\_ | ||
------------------------------ | ||
|
||
.. py:function:: paddle.cauchy_(x: paddle.Tensor, loc: Numeric = 0, scale: Numeric = 1, name: str | None = 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.
函数签名不需要说明类型,但需要填写默认值,如 loc=0
docs/api/paddle/cauchy__cn.rst
Outdated
参数 | ||
::::::::: | ||
- **x** (Tensor) - 将被填充的张量,数据类型为 float32 或 float64。 | ||
- **loc** (scalar, optional) - 分布峰值的位置。数据类型为 float32 或 float64。 |
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.
optional
改为中文的 可选
增加默认值的说明,如 默认值为 0
docs/api/paddle/cauchy__cn.rst
Outdated
::::::::: | ||
- **x** (Tensor) - 将被填充的张量,数据类型为 float32 或 float64。 | ||
- **loc** (scalar, optional) - 分布峰值的位置。数据类型为 float32 或 float64。 | ||
- **scale** (scalar, optional) - 半高宽(HWHM)。数据类型为 float32 或 float64。必须为正值。 |
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.
同上
docs/api/paddle/cauchy__cn.rst
Outdated
- **x** (Tensor) - 将被填充的张量,数据类型为 float32 或 float64。 | ||
- **loc** (scalar, optional) - 分布峰值的位置。数据类型为 float32 或 float64。 | ||
- **scale** (scalar, optional) - 半高宽(HWHM)。数据类型为 float32 或 float64。必须为正值。 | ||
- **name** (str|None, optional) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 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.
str|None
改为 str
,optional
同上
docs/api/paddle/cauchy__cn.rst
Outdated
::::::::: | ||
使用 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.
合并到“返回”中,不用单独说明
docs/api/paddle/cauchy__cn.rst
Outdated
|
||
返回 | ||
::::::::: | ||
使用 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.
okkk😘 |
【Docathon】补充缺失的中文 API 文档(Inplace 类)
No.9 paddle.cauchy_ 的中文文档补充
增加:
新增cauchy__cn.rst中文文档
修改:
Overview_cn.rst中新增cauchy_相关信息(在“tensor 数学操作原位(inplace)版本”标题下)
issue:#7090
英文文档链接:https://www.paddlepaddle.org.cn/documentation/docs/en/3.0-beta/api/paddle/cauchy__en.html
@sunzhongkai588