Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 3 additions & 3 deletions docs/api/paddle/DataParallel_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DataParallel

2. 使用 ``paddle.distributed.launch`` 方法启动,例如:

``python -m paddle.distributed.launch –selected_gpus=0,1 demo.py``
``python -m paddle.distributed.launch –selected_gpus=0,1 demo.py``

其中 ``demo.py`` 脚本的代码可以是下面的示例代码。

Expand All @@ -33,7 +33,7 @@ DataParallel

返回
::::::::::::
支持数据并行的 ``Layer``。
支持数据并行的 ``Layer``

代码示例
::::::::::::
Expand Down Expand Up @@ -64,7 +64,7 @@ state_dict(destination=None, include_sublayers=True)

**参数**

- **destination** (dict,可选) - 如果提供 ``destination``,则所有参数和持久的 buffers 都将存放在 ``destination`` 中。默认值:None。
- **destination** (dict,可选) - 如果提供 ``destination`` ,则所有参数和持久的 buffers 都将存放在 ``destination`` 中。默认值:None。
- **include_sublayers** (bool,可选) - 如果设置为 True,则包括子层的参数和 buffers。默认值:True。

**返回**
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/bucketize_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bucketize
- **x** (Tensor) - 输入的 N 维 Tensor,支持的数据类型:int32、int64、float32、float64。
- **sorted_sequence** (Tensor) - 输入的一维 Tensor,支持的数据类型:int32、int64、float32、float64。该 Tensor 的数值在其最后一个维度递增。
- **out_int32** (bool,可选) - 输出的数据类型支持 int32、int64。默认值为 False,表示默认的输出数据类型为 int64。
- **right** (bool,可选) - 根据给定 ``x`` 在 ``sorted_sequence`` 查找对应的上边界或下边界。如果 ``sorted_sequence``的值为 nan 或 inf,则返回最内层维度的大小。默认值为 False,表示在 ``sorted_sequence`` 的查找给定 ``x`` 的下边界。
- **right** (bool,可选) - 根据给定 ``x`` 在 ``sorted_sequence`` 查找对应的上边界或下边界。如果 ``sorted_sequence`` 的值为 nan 或 inf,则返回最内层维度的大小。默认值为 False,表示在 ``sorted_sequence`` 的查找给定 ``x`` 的下边界。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down
12 changes: 6 additions & 6 deletions docs/api/paddle/gather_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ gather

参数
::::::::::::
- **x** (Tensor) - 输入 Tensor,秩 ``rank >= 1``,支持的数据类型包括 int32、int64、float32、float64、complex64、complex128 和 uint8 (CPU)、float16(GPU) 。
- **index** (Tensor) - 索引 Tensor,秩 ``rank = 0`` 或者 ``rank = 1``,数据类型为 int32 或 int64。
- **axis** (Tensor) - 指定 index 获取输入的维度,``axis`` 的类型可以是 int 或者 Tensor,当 ``axis`` 为 Tensor 的时候其数据类型为 int32 或者 int64。默认值为 None,当``axis``为 None 的时候其值为 0。
- **x** (Tensor) - 输入 Tensor,秩 ``rank >= 1`` ,支持的数据类型包括 int32、int64、float32、float64、complex64、complex128 和 uint8 (CPU)、float16(GPU) 。
- **index** (Tensor) - 索引 Tensor,秩 ``rank = 0`` 或者 ``rank = 1`` ,数据类型为 int32 或 int64。
- **axis** (Tensor) - 指定 index 获取输入的维度, ``axis`` 的类型可以是 int 或者 Tensor,当 ``axis`` 为 Tensor 的时候其数据类型为 int32 或者 int64。默认值为 None,当 ``axis`` 为 None 的时候其值为 0。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand All @@ -68,13 +68,13 @@ PyTorch 兼容的 ``gather`` 操作:根据索引 index 获取输入 ``input``
参数
::::::::::::
- **input** (Tensor) - 输入 Tensor,支持的数据类型包括 int32、int64、float32、float64、int16、uint8、float16(GPU)以及 bfloat16(GPU) 。
- **dim** (int) - 指定 index 获取输入的维度,``dim`` 的类型可以是 int 或者。
- **index** (Tensor) - 索引 Tensor,``index`` 张量的各维度需要小于等于 ``input`` 张量的各维度(除 ``dim`` 维度外),且值需要在 ``input.shape[dim]`` 范围内。数据类型为 int32 或 int64。
- **dim** (int) - 指定 index 获取输入的维度, ``dim`` 的类型可以是 int 或者。
- **index** (Tensor) - 索引 Tensor, ``index`` 张量的各维度需要小于等于 ``input`` 张量的各维度(除 ``dim`` 维度外),且值需要在 ``input.shape[dim]`` 范围内。数据类型为 int32 或 int64。
- **out** (Tensor,可选) - 用于引用式传入输出值,注意:动态图下 out 可以是任意 Tensor,默认值为 None。

.. caution::

本接口没有实现 PyTorch 的 ``sparse_grad`` 参数!梯度默认是稠密的,等效于 ``sparse_grad=False``。
本接口没有实现 PyTorch 的 ``sparse_grad`` 参数!梯度默认是稠密的,等效于 ``sparse_grad=False``


返回
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/increment_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ increment



在控制流程中用来让参数``x`` 的数值增加 ``value`` 。
在控制流程中用来让参数 ``x`` 的数值增加 ``value`` 。

参数
:::::::::
Expand Down