!45045 fix roll and lppool docs

Merge pull request !45045 from 冯一航/code_docs_fix_roll_lppool_docs
This commit is contained in:
i-robot 2022-11-03 03:08:19 +00:00 committed by Gitee
commit 8be2b5275a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 12 additions and 11 deletions

View File

@ -13,7 +13,7 @@ mindspore.nn.LPPool1d
f(X) = \sqrt[p]{\sum_{x \in X} x^{p}}
参数:
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p不能为0
- 如果 p = 1得到的结果为池化核内元素之和与平均池化成比例
- 如果 p = :math:`\infty`,得到的结果为最大池化的结果。

View File

@ -13,7 +13,7 @@ mindspore.nn.LPPool2d
f(X) = \sqrt[p]{\sum_{x \in X} x^{p}}
参数:
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p不能为0
- 如果 p = 1得到的结果为池化核内元素之和与平均池化成比例
- 如果 p = :math:`\infty`,得到的结果为最大池化的结果。

View File

@ -14,7 +14,7 @@ mindspore.ops.lp_pool1d
参数:
- **x** (Tensor) - shape为 :math:`(N, C_{in}, L_{in})`:math:`(C, L_{in})` 的Tensor。
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p不能为0
- 如果 p = 1得到的结果为池化核内元素之和与平均池化成比例
- 如果 p = :math:`\infty`,得到的结果为最大池化的结果。

View File

@ -14,7 +14,7 @@ mindspore.ops.lp_pool2d
参数:
- **x** (Tensor) - shape为 :math:`(N, C, H_{in}, W_{in})` 的Tensor。
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p
- **norm_type** (Union[int, float]) - 标准化类型代表公式里的p不能为0
- 如果 p = 1得到的结果为池化核内元素之和与平均池化成比例
- 如果 p = :math:`\infty`,得到的结果为最大池化的结果。

View File

@ -1,14 +1,14 @@
mindspore.ops.roll
===================
.. py:function:: mindspore.ops.roll(x, shifts, dims)
.. py:function:: mindspore.ops.roll(x, shifts, dims=None)
沿轴移动Tensor的元素。
参数:
- **x** (Tensor) - 输入Tensor。
- **shifts** (Union[list(int), tuple(int), int]) - 指定元素移动方式,如果为正数,则元素沿指定维度正向移动(朝向较大的索引)的位置数。负偏移将向相反的方向滚动元素。
- **dims** (Union[list(int), tuple(int), int]) - 指定需移动维度的轴。
- **dims** (Union[list(int), tuple(int), int], optional) - 指定需移动维度的轴。默认值None。
返回:
Tensorshape和数据类型与输入 `x` 相同。

View File

@ -94,7 +94,7 @@ class LPPool1d(Cell):
f(X) = \sqrt[p]{\sum_{x \in X} x^{p}}
Args:
norm_type (Union[int, float]): Type of normalization, represents p in the formula,
norm_type (Union[int, float]): Type of normalization, represents p in the formula, can not be 0.
- if p = 1, one gets Sum Pooling (which is proportional to Average Pooling),
- if p = :math:`\infty`, one gets Max Pooling.
@ -165,7 +165,7 @@ class LPPool2d(Cell):
f(X) = \sqrt[p]{\sum_{x \in X} x^{p}}
Args:
norm_type(Union[int, float]) - Type of normalization, represents p in the formula,
norm_type(Union[int, float]) - Type of normalization, represents p in the formula, can not be 0.
- if p = 1, one gets Sum Pooling (which is proportional to Average Pooling),
- if p = :math:`\infty`, one gets Max Pooling.

View File

@ -5687,7 +5687,8 @@ def roll(x, shifts, dims=None):
shifts (Union[list(int), tuple(int), int]): Specifies the number of places by which elements are shifted
positively (towards larger indices) along the specified dimension. Negative shifts will roll the elements
in the opposite direction.
dims (Union[list(int), tuple(int), int]): Specifies the dimension indexes of shape to be rolled.
dims (Union[list(int), tuple(int), int], optional): Specifies the dimension indexes of shape to be rolled.
Default: None.
Returns:
Tensor, has the same shape and type as `x`.

View File

@ -4054,7 +4054,7 @@ def lp_pool1d(x, norm_type, kernel_size, stride=None, ceil_mode=False):
Args:
x (Tensor): Tensor of shape :math:`(N, C, L_{in})` or :math:`(C, L_{in})`.
norm_type (Union[int, float]): Type of normalization, represents p in the formula,
norm_type (Union[int, float]): Type of normalization, represents p in the formula, can not be 0,
- if p = 1, one gets Sum Pooling (which is proportional to Average Pooling),
- if p = :math:`\infty`, one gets Max Pooling.
@ -4133,7 +4133,7 @@ def lp_pool2d(x, norm_type, kernel_size, stride=None, ceil_mode=False):
Args:
x (Tensor): Tensor of shape :math:`(N, C, H_{in}, W_{in})`.
norm_type (Union[int, float]): Type of normalization, represents p in the formula,
norm_type (Union[int, float]): Type of normalization, represents p in the formula, can not be 0,
- if p = 1, one gets Sum Pooling (which is proportional to Average Pooling),
- if p = :math:`\infty`, one gets Max Pooling.