!48210 add api_name in list

Merge pull request !48210 from 俞涵/code_docs_1110
This commit is contained in:
i-robot 2023-01-31 02:09:46 +00:00 committed by Gitee
commit 1a2438a0e8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
11 changed files with 12 additions and 152 deletions

View File

@ -83,8 +83,9 @@ MindSpore中 `mindspore.ops.primitive` 接口与上一版本相比,新增、
mindspore.ops.Pad
mindspore.ops.Padding
mindspore.ops.PadV3
mindspore.ops.ResizeNearestNeighbor
mindspore.ops.ResizeBilinear
mindspore.ops.ResizeLinear1D
mindspore.ops.ResizeNearestNeighbor
mindspore.ops.UpsampleNearest3D
mindspore.ops.UpsampleTrilinear3D
@ -227,6 +228,7 @@ MindSpore中 `mindspore.ops.primitive` 接口与上一版本相比,新增、
mindspore.ops.PSROIPooling
mindspore.ops.RGBToHSV
mindspore.ops.ResizeArea
mindspore.ops.ResizeBicubic
mindspore.ops.ResizeBilinearV2
mindspore.ops.ROIAlign
mindspore.ops.SampleDistortedBoundingBoxV2
@ -324,6 +326,7 @@ MindSpore中 `mindspore.ops.primitive` 接口与上一版本相比,新增、
mindspore.ops.LogicalAnd
mindspore.ops.LogicalNot
mindspore.ops.LogicalOr
mindspore.ops.Logit
mindspore.ops.Mod
mindspore.ops.Mul
mindspore.ops.MulNoNan

View File

@ -1,6 +0,0 @@
mindspore.ops.DynamicShape
===========================
.. py:class:: mindspore.ops.DynamicShape
`TensorShape` 相同。 `DynamicShape` 将会被 `TensorShape` 替换。请使用 `TensorShape`

View File

@ -1,27 +0,0 @@
mindspore.ops.NeighborExchange
===============================
.. py:class:: mindspore.ops.NeighborExchange(send_rank_ids, recv_rank_ids, recv_shapes, send_shapes, recv_type,group=GlobalComm.WORLD_COMM_GROUP)
NeighborExchange是一个集合通信函数。
将数据从本地rank发送到 `send_rank_ids` 中指定的rank同时从 `recv_rank_ids` 接收数据。
.. note::
在运行以下示例之前,用户需要预置环境变量,请在 `MindSpore <https://www.mindspore.cn/docs/zh-CN/master/api_python/mindspore.ops.html#通信算子>`_ 的官方网站上查看详细信息。
要求全连接配网每台设备具有相同的vlan idip和mask在同一子网请查看 `详细信息 <https://www.mindspore.cn/tutorials/experts/zh-CN/master/parallel/communicate_ops.html#注意事项>`_
参数:
- **send_rank_ids** (list(int)) - 指定发送数据的rank。
- **recv_rank_ids** (list(int)) - 指定接收数据的rank。
- **recv_shapes** (tuple(list(int))) - 指定 `recv_rank_ids` 接收数据的shape。
- **send_shapes** (tuple(list(int))) - 指定 `send_rank_ids` 发送数据的shape。
- **recv_type** (type) - 指定 `recv_rank_ids` 接收的数据类型。
- **group** (str) - 要处理的通信范围。默认值:"GlobalComm.WORLD_COMM_GROUP"。
输入:
- **input_x** (tuple[Tensor]) - shape与参数send_shapes相同。
输出:
Tuple tensorshape与参数recv_shapes相同。

View File

@ -1,32 +0,0 @@
mindspore.ops.PadAndShift
==========================
.. py:class:: mindspore.ops.PadAndShift
使用-1初始化一个Tensor然后从 `input_x` 转移一个切片到该Tensor。
.. note::
如果在Python中使用PadAndShift按下面流程得到输出Tensor
output = [-1] * cum_sum_arr[-1]
start = cum_sum_arr[shift_idx]
end = cum_sum_arr[shift_idx + 1]
output[start:end] = input_x[:(end-start)]
输入:
- **input_x** (Tensor) - 输入Tensor将被转移到 `output`
- **cum_sum_arr** (Tensor) - `cum_sum_arr` 的最后一个值是输出Tensor的长度 `cum_sum_arr[shift_idx]` 是转移起点, `cum_sum_arr[shift_idx+1]` 是转移终点。
- **shift_idx** (int) - `cum_sum_arr` 的下标。
输出:
- **output** (Tensor) - Tensor数据类型与 `input` 一致。
异常:
- **TypeError** - `input_x` 或者 `cum_sum_arr` 不是Tensor。
- **TypeError** - `shift_idx` 不是int。
- **ValueError** - `shift_idx` 的值大于等于 `cum_sum_arr` 的长度。

View File

@ -1,26 +0,0 @@
mindspore.ops.Poisson
=====================
.. py:class:: mindspore.ops.Poisson(seed=0, seed2=0)
生成 Poisson 分布的随机数。
.. math::
\text{P}(i|μ) = \frac{\exp(-μ)μ^{i}}{i!}
参数:
- **seed** (int) - 算子层的随机种子用于生成随机数。必须是非负的。默认值0。
- **seed2** (int) - 全局的随机种子和算子层的随机种子共同决定最终生成的随机数。必须是非负的。默认值0。
输入:
- **shape** (tuple) - 待生成的随机 Tensor 的 shape。只支持常量值。
- **mean** (Tensor) - Poisson 分布的期望,也就是上面公式中的 μ。其值必须大于0。数据类型为 float32。
输出:
Tensor。shape是输入 `shape``mean` 广播后的 shape。数据类型为 int32。
异常:
- **TypeError** - `seed``seed2` 的数据类型不是 int。
- **TypeError** - `shape` 不是 tuple。
- **TypeError** - `mean` 不是数据类型为 float32 的 Tensor。

View File

@ -1,25 +0,0 @@
mindspore.ops.ReLUV2
====================
.. py:class:: mindspore.ops.ReLUV2
ReLUV2接口已经弃用请使用 :class:`mindspore.ops.ReLU` 替代。
线性修正单元激活函数Rectified Linear Unit activation function
按元素返回 :math:`\max(x,\ 0)` 。特别说明负数输出值会被修改为0正数输出不受影响。
.. math::
\text{ReLU}(x) = (x)^+ = \max(0, x)
输入:
- **input_x** (Tensor) - 输入Tensor必须是4-D Tensor。
输出:
- **output** (Tensor) - 数据类型和shape与 `input_x` 的相同。
- **mask** (Tensor) - 保留输出,无实际意义。
异常:
- **TypeError** - `input_x` 不是Tensor。
- **ValueError** - `input_x` 的shape不是4-D。

View File

@ -1,22 +0,0 @@
mindspore.ops.Receive
======================
.. py:class:: mindspore.ops.Receive(sr_tag, src_rank, shape, dtype, group="hccl_world_group/nccl_world_group")
从src_rank接收张量。
.. note::
Send和Receive必须组合使用并且具有相同的sr_tag。Receive必须在服务器之间使用。
参数:
- **sr_tag** (int) - 标识发送/接收消息标签的所需的整数。消息将将由具有相同 `sr_tag` 的Send算子发送。
- **src_rank** (int) - 标识设备rank的所需整数。
- **shape** (list[int]) - 标识要接收的Tensor的shape的所需列表。
- **dtype** (Type) - 标识要接收的Tensor类型的必要类型。支持的类型int8、int16、int32、float16和float32。
- **group** (str可选) - 工作通信组。默认值在Ascend上为“hccl_world_group”在GPU上为”nccl_world_group”。
输入:
- **input_x** (Tensor) - 输入Tensor其shape为 :math:`(x_1, x_2, ..., x_R)`

View File

@ -1,7 +0,0 @@
mindspore.ops.SparseApplyAdagrad
================================
.. py:class:: mindspore.ops.SparseApplyAdagrad(lr, update_slots=True, use_locking=False)
已弃用

View File

@ -83,8 +83,9 @@ Neural Network
mindspore.ops.EmbeddingLookup
mindspore.ops.Padding
mindspore.ops.PadV3
mindspore.ops.ResizeNearestNeighbor
mindspore.ops.ResizeBilinear
mindspore.ops.ResizeLinear1D
mindspore.ops.ResizeNearestNeighbor
mindspore.ops.UpsampleNearest3D
mindspore.ops.UpsampleTrilinear3D
@ -226,6 +227,7 @@ Image Processing
mindspore.ops.PSROIPooling
mindspore.ops.RGBToHSV
mindspore.ops.ResizeArea
mindspore.ops.ResizeBicubic
mindspore.ops.ResizeBilinearV2
mindspore.ops.ROIAlign
mindspore.ops.SampleDistortedBoundingBoxV2
@ -323,6 +325,7 @@ Element-wise Operator
mindspore.ops.LogicalAnd
mindspore.ops.LogicalNot
mindspore.ops.LogicalOr
mindspore.ops.Logit
mindspore.ops.Mod
mindspore.ops.Mul
mindspore.ops.MulNoNan

View File

@ -269,10 +269,10 @@ class PadAndShift(PrimitiveWithCheck):
Inputs:
- **input_x** (Tensor) - The input Tensor, which will be copied
to `output`.
to `output`.
- **cum_sum_arr** (Tensor) - The last value of cum_sum_arr is
the pad length of output tensor, `cum_sum_arr[shift_idx]` is
the start to shift, and `cum_sum_arr[shift_idx+1]` is the end.
the pad length of output tensor, `cum_sum_arr[shift_idx]` is
the start to shift, and `cum_sum_arr[shift_idx+1]` is the end.
- **shift_idx** (int) - The idx of `cum_sum_arr` .
Outputs:
@ -281,7 +281,7 @@ class PadAndShift(PrimitiveWithCheck):
Raises:
TypeError: `input_x` or `cum_sum_arr` is not Tensor.
TypeError: `shift_idx` is not int.
ValueError: Value of `shift_idx` is larger than or equal to the length of `cum_sum_arr` .
ValueError: Value of `shift_idx` is larger than or equal to the length of `cum_sum_arr` .
Supported Platforms:
`CPU`

View File

@ -755,7 +755,6 @@ class ResizeBicubic(Primitive):
half_pixel_centers (bool, optional): Whether to use half-pixel center alignment. If set to True,
`align_corners` should be False. Default: False.
Inputs:
- **images** (Tensor) - The input image must be a 4-D tensor of shape :math:`(batch, channels, height, width)`.
The format must be NHWC.