Skip to content

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

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/paddle/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ tensor 数学操作原位(inplace)版本
" :ref:`paddle.add_ <cn_api_paddle_add_>` ", "Inplace 版本的 add API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.addmm_ <cn_api_paddle_addmm_>` ", "Inplace 版本的 addmm API,对输入 input 采用 Inplace 策略"
" :ref:`paddle.put_along_axis_ <cn_api_paddle_put_along_axis_>` ", "Inplace 版本的 put_along_axis API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.cauchy_ <cn_api_paddle_cauchy_>` ", "Inplace 版本的 cauchy API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.ceil_ <cn_api_paddle_ceil_>` ", "Inplace 版本的 ceil API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.clip_ <cn_api_paddle_clip_>` ", "Inplace 版本的 clip API,对输入 x 采用 Inplace 策略"
" :ref:`paddle.copysign_ <cn_api_paddle_copysign_>` ", "Inplace 版本的 copysign API,对输入 x 采用 Inplace 策略"
Expand Down
28 changes: 28 additions & 0 deletions docs/api/paddle/cauchy__cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _cn_api_paddle_cauchy_:

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

.. py:function:: paddle.cauchy_(x, loc=0, scale=1, name=None)
该函数将输入 Tensor 填充为从柯西分布(Cauchy distribution)中采样的随机数。

参数
::::::::::::

- **x** (Tensor) - 待填充的目标张量,数据类型必须为 float32 或 float64。
- **loc** (scalar,可选) - 柯西分布的峰值位置,数据类型为 float32 或 float64,默认值为 0。
- **scale** (scalar,可选) - 柯西分布的半高全宽(HWHM),必须为正数,数据类型为 float32 或 float64,默认值为 1。
- **name** (str|None,可选) - 操作的名称,一般无需设置,默认值为 None。

返回
::::::::::::
填充了柯西分布随机数的输入张量

返回类型
::::::::::::
Tensor

代码示例
::::::::::::

COPY-FROM: paddle.cauchy_