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

[Docathon][Add Inplace CN Doc No.9] #7230

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

superdonkey007
Copy link

@sunzhongkai588
新增cauchy_.rst中文文档,同时在Overview_cn.rst中新增cauchy_相关信息(在“tensor 数学操作原位(inplace)版本”标题下)
issue:#7090
英文文档链接:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/cauchy__en.html

Copy link

paddle-bot bot commented Apr 4, 2025

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

@superdonkey007 superdonkey007 changed the title 增加了inplace类cauchy_方法的中文文档 [Docathon][Add Inplace CN Doc No.9] Apr 4, 2025
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 7, 2025
@@ -254,6 +254,7 @@ tensor 数学操作原位(inplace)版本
" :ref:`paddle.nan_to_num_ <cn_api_paddle_nan_to_num_>` ", "Inplace 版本的 nan_to_num API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.i0_ <cn_api_paddle_i0_>` ", "Inplace 版本的 i0 API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.lcm_ <cn_api_paddle_lcm_>` ", "Inplace 版本的 lcm API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.cauchy_ <cn_api_paddle_cauchy_>` ", 对现有张量``x``进行原地修改,将所有元素替换为从柯西分布中随机采样的数值。
Copy link
Collaborator

Choose a reason for hiding this comment

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

按字母排序放到前面吧

cauchy\_
-------------------------------

.. py:function:: paddle.cauchy_(x: paddle.Tensor, loc: Numeric = 0, scale: Numeric = 1, name: str | None = None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.. py:function:: paddle.cauchy_(x: paddle.Tensor, loc: Numeric = 0, scale: Numeric = 1, name: str | None = None)
.. py:function:: paddle.cauchy_(x, loc = 0, scale = 1, name = None)




对现有张量``x``进行原地修改,将所有元素替换为从柯西分布中随机采样的数值。
Copy link
Collaborator

Choose a reason for hiding this comment

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

逗号用中文的。对现有张量``x``进行原地修改 赶紧语句有些不通顺,改成如 直接修改输入张量

::::::::::::

- **x** (Tensor) - 输入的 Tensor,支持的数据类型为:float32、float64。
- **loc** (scalar|可选) - 分布峰值的位置参数,数据类型为 float32 或 float64。
Copy link
Collaborator

Choose a reason for hiding this comment

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

参考 API 文档的参数写法,可选参数写为 可选,并且参数说明里要写清楚默认值和默认值的含义

Suggested change
- **loc** (scalar|可选) - 分布峰值的位置参数,数据类型为 float32 或 float64。
- **loc** (scalar可选) - 分布峰值的位置参数,数据类型为 float32 或 float64。

Copy link
Author

Choose a reason for hiding this comment

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

已经按要求和规范进行了修改,感谢您的指正 @sunzhongkai588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants