ops模块API文档修正

This commit is contained in:
yangxixin 2022-11-28 20:18:13 +08:00
parent 9a40f0def5
commit 6c1f330683
6 changed files with 17 additions and 11 deletions

View File

@ -482,6 +482,7 @@ Array操作
mindspore.ops.Concat
mindspore.ops.ConjugateTranspose
mindspore.ops.Cummax
mindspore.ops.Cummin
mindspore.ops.CumProd
mindspore.ops.CumSum
mindspore.ops.DataFormatDimMap

View File

@ -1,12 +1,12 @@
mindspore.ops.Assert
=====================
.. py:class:: mindspore.ops.Assert(summarize=None)
.. py:class:: mindspore.ops.Assert(summarize=3)
判断给定条件是否为True若不为True则以list的形式打印 `input_data` 中的Tensor否则继续往下运行代码。
参数:
- **summarize** (int, 可选) - 当判断结果为False时打印 `input_data` 中每个Tensor的条目的数量。默认值None
- **summarize** (int, 可选) - 当判断结果为False时打印 `input_data` 中每个Tensor的条目的数量。默认值3
输入:
- **condition** ([Union[Tensor[bool], bool]]) - 需要进行判断的条件。

View File

@ -0,0 +1,8 @@
mindspore.ops.Cummin
=====================
.. py:class:: mindspore.ops.Cummin(axis)
返回输入Tensor在指定轴上的累计最大值与其对应的索引。
更多参考详见 :func:`mindspore.ops.cummin`

View File

@ -481,6 +481,7 @@ Array Operation
mindspore.ops.Concat
mindspore.ops.ConjugateTranspose
mindspore.ops.Cummax
mindspore.ops.Cummin
mindspore.ops.CumProd
mindspore.ops.CumSum
mindspore.ops.DataFormatDimMap

View File

@ -556,14 +556,10 @@ class Col2Im(Primitive):
Tensor, a 4-D Tensor with same type of input `x`.
Raises:
TypeError: If :attr:`kernel_size` data type is not in Union[int, tuple[int], list[int]].
TypeError: If :attr:`dilation` data type is not in Union[int, tuple[int], list[int]].
TypeError: If :attr:`padding` data type is not in Union[int, tuple[int], list[int]].
TypeError: If :attr:`stride` data type is not in Union[int, tuple[int], list[int]].
ValueError: If :attr:`kernel_size` value is not greater than zero or elements number more than 2.
ValueError: If :attr:`dilation` value is not greater than zero or elements number more than 2.
ValueError: If :attr:`padding` value is not greater than zero or elements number more than 2.
ValueError: If :attr:`stride` value is not greater than zero or elements number more than 2.
TypeError: If dtype of `kernel_size` , `dilation` , `padding` or `stride` is not in
Union[int, tuple[int], list[int]].
ValueError: If values in `kernel_size` , `dilation` , `padding` or `stride` are not greater than zero or any
one of them has more than 2 elements.
ValueError: If x.shape[2] != kernel_size[0] * kernel_size[1].
ValueError: If x.shape[3] does not match the calculated number of sliding blocks.

View File

@ -507,7 +507,7 @@ class Assert(PrimitiveWithInfer):
Args:
summarize (int, optional): The number of entries to be printed in each tensor while the given condition is
identified to be False. Default: None.
identified to be False. Default: 3.
Inputs:
- **condition** (Union[Tensor[bool], bool]) - The condition to be identified.