Skip to content

Commit e838dd7

Browse files
authored
[Docs] Add Chinese docs for paddle.randn_like (#7296)
* add * fix * fix
1 parent de02280 commit e838dd7

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

docs/api/paddle/Overview_cn.rst

+1
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ tensor random 相关
420420
" :ref:`paddle.randint <cn_api_paddle_randint>` ", "返回服从均匀分布的、范围在[low, high)的随机 Tensor"
421421
" :ref:`paddle.randint_like <cn_api_paddle_randint_like>` ", "返回一个和 x 具有相同形状的服从均匀分布的、范围在[low, high)的随机 Tensor,数据类型为 dtype 或者和 x 相同。"
422422
" :ref:`paddle.randn <cn_api_paddle_randn>` ", "返回符合标准正态分布(均值为 0,标准差为 1 的正态随机分布)的随机 Tensor"
423+
" :ref:`paddle.randn_like <cn_api_paddle_randn_like>` ", "返回一个和 x 具有相同形状的服从标准正态分布(均值为 0,标准差为 1 的正态随机分布)的随机 Tensor,数据类型为 dtype 或者和 x 相同。"
423424
" :ref:`paddle.randperm <cn_api_paddle_randperm>` ", "返回一个数值在 0 到 n-1、随机排列的 1-D Tensor"
424425
" :ref:`paddle.seed <cn_api_paddle_seed>` ", "设置全局默认 generator 的随机种子"
425426
" :ref:`paddle.uniform <cn_api_paddle_uniform>` ", "返回数值服从范围[min, max)内均匀分布的随机 Tensor"

docs/api/paddle/randn_cn.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ randn
1010
参数
1111
::::::::::
1212
- **shape** (list|tuple|Tensor) - 生成的随机 Tensor 的形状。如果 ``shape`` 是 list、tuple,则其中的元素可以是 int,或者是形状为[]且数据类型为 int32、int64 的 0-D Tensor。如果 ``shape`` 是 Tensor,则是数据类型为 int32、int64 的 1-D Tensor。
13-
- **dtype** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64、complex64、complex128。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
13+
- **dtype** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float16、bfloat16、float32、float64、complex64、complex128。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
1414
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
1515

1616
返回

docs/api/paddle/randn_like_cn.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _cn_api_paddle_randn_like:
2+
3+
randn_like
4+
-------------------------------
5+
6+
.. py:function:: paddle.randn_like(x, dtype=None, name=None)
7+
8+
返回一个与输入张量尺寸相同的张量,其元素服从均值为 0、方差为 1 的标准正态分布。
9+
10+
参数
11+
::::::::::
12+
- **x** (Tensor) – 输入的多维 Tensor,数据类型可以是 float16,bfloat16,float32,float64,complex64,complex128。输出 Tensor 的形状和 ``x`` 相同。如果 ``dtype`` 为 None,则输出 Tensor 的数据类型与 ``x`` 相同。
13+
- **dtype** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float16,bfloat16,float32,float64,complex64,complex128。当该参数值为 None 时,输出 Tensor 的数据类型与输入 Tensor 的数据类型一致。默认值为 None。
14+
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
15+
16+
返回
17+
::::::::::
18+
Tensor:服从均值为 0、方差为 1 的标准正态分布 Tensor,形状为 ``x.shape``,数据类型为 ``dtype``。
19+
20+
代码示例
21+
:::::::::::
22+
23+
COPY-FROM: paddle.randn_like

docs/api/paddle/standard_normal_cn.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ standard_normal
1010
参数
1111
::::::::::
1212
- **shape** (list|tuple|Tensor) - 生成的随机 Tensor 的形状。如果 ``shape`` 是 list、tuple,则其中的元素可以是 int,或者是形状为[]且数据类型为 int32、int64 的 0-D Tensor。如果 ``shape`` 是 Tensor,则是数据类型为 int32、int64 的 1-D Tensor。
13-
- **dtype** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64、complex64、complex128。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
13+
- **dtype** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float16、bfloat16、float32、float64、complex64、complex128。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
1414
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
1515

1616
返回

0 commit comments

Comments
 (0)