fix some issues

This commit is contained in:
lilinjie 2022-11-19 10:12:44 +08:00
parent 3c17465db9
commit 6f124e3111
77 changed files with 218 additions and 199 deletions

View File

@ -16,6 +16,9 @@ mindspore.nn.Conv2d
此时输入Tensor对应的 `data_format` 为"NCHW"完整卷积核的shape为 :math:`(C_{out}, C_{in} / \text{group}, \text{kernel_size[0]}, \text{kernel_size[1]})` ,其中 `group` 是在空间维度上分割输入 `x` 的组数。如果输入Tensor对应的 `data_format` 为"NHWC"完整卷积核的shape则为 :math:`(C_{out}, \text{kernel_size[0]}, \text{kernel_size[1]}), C_{in} / \text{group}`
详细介绍请参考论文 `Gradient Based Learning Applied to Document Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `in\_channels` = `out\_channels` = `group` 的约束条件。
参数:
- **in_channels** (int) - Conv2d层输入Tensor的空间维度。
- **out_channels** (int) - Conv2d层输出Tensor的空间维度。
@ -35,9 +38,6 @@ mindspore.nn.Conv2d
- **bias_init** (Union[Tensor, str, Initializer, numbers.Number]) - 偏置参数的初始化方法。可以使用的初始化方法与"weight_init"相同。更多细节请参考Initializer的值。默认值"zeros"。
- **data_format** (str) - 数据格式的可选值有"NHWC""NCHW"。默认值:"NCHW"。
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `in\_channels` = `out\_channels` = `group` 的约束条件。
输入:
- **x** (Tensor) - Shape为 :math:`(N, C_{in}, H_{in}, W_{in})` 或者 :math:`(N, H_{in}, W_{in}, C_{in})` 的Tensor。

View File

@ -16,6 +16,9 @@ mindspore.nn.Conv3d
完整卷积核的shape为 :math:`(C_{out}, C_{in} / \text{group}, \text{kernel_size[0]}, \text{kernel_size[1]}, \text{kernel_size[2]})` ,其中 `group` 是在空间维度上分割输入 `x` 的组数。
详细介绍请参考论文 `Gradient Based Learning Applied to Document Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `in\_channels` = `out\_channels` = `group` 的约束条件。
参数:
- **in_channels** (int) - Conv3d层输入Tensor的空间维度。
- **out_channels** (int) - Conv3d层输出Tensor的空间维度。

View File

@ -1,7 +1,7 @@
mindspore.ops.AddN
===================
.. py:class:: mindspore.ops.AddN()
.. py:class:: mindspore.ops.AddN
逐元素将所有输入的Tensor相加。

View File

@ -1,7 +1,7 @@
mindspore.ops.AdjustHue
=======================
.. py:class:: mindspore.ops.AdjustHue()
.. py:class:: mindspore.ops.AdjustHue
调整 RGB 图像的色调。

View File

@ -1,7 +1,7 @@
mindspore.ops.AdjustSaturation
==============================
.. py:class:: mindspore.ops.AdjustSaturation()
.. py:class:: mindspore.ops.AdjustSaturation
调整 RGB 图像的饱和度。

View File

@ -1,7 +1,7 @@
mindspore.ops.AffineGrid
========================
.. py:class:: mindspore.ops.AffineGrid()
.. py:class:: mindspore.ops.AffineGrid
给定一批仿射矩阵 theta生成 2D 或 3D 流场(采样网格)。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselI0e
========================
.. py:class:: mindspore.ops.BesselI0e()
.. py:class:: mindspore.ops.BesselI0e
逐元素计算输入数据的BesselI0e函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselI1e
========================
.. py:class:: mindspore.ops.BesselI1e()
.. py:class:: mindspore.ops.BesselI1e
逐元素计算输入数据的BesselI1e函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselJ0
======================
.. py:class:: mindspore.ops.BesselJ0()
.. py:class:: mindspore.ops.BesselJ0
逐元素计算输入数据的BesselJ0函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselJ1
======================
.. py:class:: mindspore.ops.BesselJ1()
.. py:class:: mindspore.ops.BesselJ1
逐元素计算输入数据的BesselJ1函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselK0
======================
.. py:class:: mindspore.ops.BesselK0()
.. py:class:: mindspore.ops.BesselK0
逐元素计算输入数据的BesselK0函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselK0e
=======================
.. py:class:: mindspore.ops.BesselK0e()
.. py:class:: mindspore.ops.BesselK0e
逐元素计算输入数据的BesselK0e函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselK1
======================
.. py:class:: mindspore.ops.BesselK1()
.. py:class:: mindspore.ops.BesselK1
逐元素计算输入数据的BesselK1函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselK1e
=======================
.. py:class:: mindspore.ops.BesselK1e()
.. py:class:: mindspore.ops.BesselK1e
逐元素计算输入数据的BesselK1e函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselY0
======================
.. py:class:: mindspore.ops.BesselY0()
.. py:class:: mindspore.ops.BesselY0
逐元素计算输入数据的BesselY0函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BesselY1
======================
.. py:class:: mindspore.ops.BesselY1()
.. py:class:: mindspore.ops.BesselY1
逐元素计算输入数据的BesselY1函数值。

View File

@ -1,7 +1,7 @@
mindspore.ops.BitwiseAnd
========================
.. py:class:: mindspore.ops.BitwiseAnd()
.. py:class:: mindspore.ops.BitwiseAnd
逐元素执行两个Tensor的与运算。

View File

@ -1,7 +1,7 @@
mindspore.ops.BitwiseOr
=======================
.. py:class:: mindspore.ops.BitwiseOr()
.. py:class:: mindspore.ops.BitwiseOr
逐元素执行两个Tensor的或运算。

View File

@ -1,7 +1,7 @@
mindspore.ops.BitwiseXor
========================
.. py:class:: mindspore.ops.BitwiseXor()
.. py:class:: mindspore.ops.BitwiseXor
逐元素执行两个Tensor的异或运算。

View File

@ -1,7 +1,7 @@
mindspore.ops.Cdist
===================
.. py:class:: mindspore.ops.Cdist()
.. py:class:: mindspore.ops.Cdist
计算两个tensor的p-范数距离。

View File

@ -1,18 +1,17 @@
mindspore.ops.CheckValid
=========================
.. py:class:: mindspore.ops.CheckValid()
.. py:class:: mindspore.ops.CheckValid
检查边界框。
检查边界框的交叉数据和数据边界是否有效。
检查由 `bboxes` 指定的一些边框是否是有效的。
如果边框在由 `img_metas` 确定的边界内部则返回True否则返回False。
.. warning::
`img_metas` 指定的边界 `(长度 * 比率, 宽度 * 比率)` 需要是有效的。
输入:
- **bboxes** (Tensor) - shape大小为 :math:`(N, 4)`:math:`N` 表示边界框的数量, `4` 表示 `x0``x1``y0``y` 。数据类型必须是float16或float32。
- **img_metas** (Tensor) - 原始图片的信息 `(长度, 宽度, 比率)` 需要指定有效边界为 `(长度 * 比率, 宽度 * 比率)` 。数据类型必须是float16或float32。
- **img_metas** (Tensor) - 原始图片的信息 `(长度, 宽度, 比率)` ,指定有效边界为 `(长度 * 比率, 宽度 * 比率)` 。数据类型必须是float16或float32。
输出:
Tensorshape为 :math:`(N,)` 类型为bool指出边界框是否在图片内。 `True` 表示在, `False` 表示不在。

View File

@ -1,7 +1,7 @@
mindspore.ops.Div
=================
.. py:class:: mindspore.ops.Div()
.. py:class:: mindspore.ops.Div
逐元素计算第一输入Tensor除以第二输入Tensor的商。

View File

@ -1,7 +1,7 @@
mindspore.ops.Eps
=================
.. py:class:: mindspore.ops.Eps()
.. py:class:: mindspore.ops.Eps
创建一个与输入数据类型和shape都相同的Tensor元素值为对应数据类型能表达的最小值。

View File

@ -1,7 +1,7 @@
mindspore.ops.Erf
=================
.. py:class:: mindspore.ops.Erf()
.. py:class:: mindspore.ops.Erf
逐元素计算 `x` 的高斯误差函数。

View File

@ -1,7 +1,7 @@
mindspore.ops.Erfc
==================
.. py:class:: mindspore.ops.Erfc()
.. py:class:: mindspore.ops.Erfc
逐元素计算 `x` 的互补误差函数。

View File

@ -1,7 +1,7 @@
mindspore.ops.Eye
==================
.. py:class:: mindspore.ops.Eye()
.. py:class:: mindspore.ops.Eye
创建一个主对角线上元素为1其余元素为0的Tensor。

View File

@ -1,7 +1,7 @@
mindspore.ops.FastGeLU
========================
.. py:class:: mindspore.ops.FastGeLU()
.. py:class:: mindspore.ops.FastGeLU
快速高斯误差线性单元激活函数。

View File

@ -1,7 +1,7 @@
mindspore.ops.Fill
==================
.. py:class:: mindspore.ops.Fill()
.. py:class:: mindspore.ops.Fill
创建一个指定shape的Tensor并用指定值填充。

View File

@ -1,7 +1,7 @@
mindspore.ops.Flatten
======================
.. py:class:: mindspore.ops.Flatten()
.. py:class:: mindspore.ops.Flatten
扁平化Flatten输入Tensor不改变0轴的size。

View File

@ -3,7 +3,7 @@ mindspore.ops.Gamma
.. py:class:: mindspore.ops.Gamma(seed=0, seed2=0)
根据概率密度函数分布生成随机正值浮点数x
根据概率密度函数分布生成随机正值浮点数x。函数定义如下
.. math::

View File

@ -1,7 +1,7 @@
mindspore.ops.Gather
======================
.. py:class:: mindspore.ops.Gather()
.. py:class:: mindspore.ops.Gather
返回输入Tensor在指定 `axis``input_indices` 索引对应的元素组成的切片。

View File

@ -1,7 +1,7 @@
mindspore.ops.GeLU
==================
.. py:class:: mindspore.ops.GeLU()
.. py:class:: mindspore.ops.GeLU
高斯误差线性单元激活函数Gaussian Error Linear Units activation function

View File

@ -1,7 +1,7 @@
mindspore.ops.Ger
==================
.. py:class:: mindspore.ops.Ger()
.. py:class:: mindspore.ops.Ger
计算两个一维Tensor的外积。即输入 `x1` 和输入 `x2` 的外积。如果 `x1` shape为 :math:`(m,)` `x2` shape为 :math:`(n,)`
那么输出就是一个shape为 :math:`(m, n)` 的Tensor。

View File

@ -1,7 +1,7 @@
mindspore.ops.Greater
=====================
.. py:class:: mindspore.ops.Greater()
.. py:class:: mindspore.ops.Greater
按元素比较输入参数 :math:`x,y` 的值输出结果为bool值。

View File

@ -1,7 +1,7 @@
mindspore.ops.Inv
=================
.. py:class:: mindspore.ops.Inv()
.. py:class:: mindspore.ops.Inv
按元素计算输入Tensor的倒数。

View File

@ -1,7 +1,7 @@
mindspore.ops.L2Loss
====================
.. py:class:: mindspore.ops.L2Loss()
.. py:class:: mindspore.ops.L2Loss
用于计算L2范数的一半但不对结果进行开方操作。

View File

@ -1,7 +1,7 @@
mindspore.ops.LSTM
===================
.. py:class:: mindspore.ops.LSTM(input_size, hidden_size, num_layers, has_bias, bidirectional, dropout=0.0)
.. py:class:: mindspore.ops.LSTM(input_size, hidden_size, num_layers, has_bias, bidirectional, dropout)
对输入执行长短期记忆LSTM网络。
@ -13,7 +13,7 @@ mindspore.ops.LSTM
- **num_layers** (int) - LSTM的网络层数。
- **has_bias** (bool) - Cell是否有偏置 `b_ih``b_hh`
- **bidirectional** (bool) - 是否为双向LSTM。
- **dropout** (float,可选) - 指的是除第一层外每层输入时的dropout概率。dropout的范围为[0.0, 1.0]。默认值0。
- **dropout** (float) - 指的是除第一层外每层输入时的dropout概率。dropout的范围为[0.0, 1.0]。
输入:
- **input** (Tensor) - shape为 :math:`(seq\_len, batch\_size, input\_size)`:math:`(batch\_size, seq\_len, input\_size)` 的Tensor。

View File

@ -1,7 +1,7 @@
mindspore.ops.LessEqual
========================
.. py:class:: mindspore.ops.LessEqual()
.. py:class:: mindspore.ops.LessEqual
逐元素计算 :math:`x <= y` 的bool值。

View File

@ -1,7 +1,7 @@
mindspore.ops.Log
=================
.. py:class:: mindspore.ops.Log()
.. py:class:: mindspore.ops.Log
逐元素返回Tensor的自然对数。

View File

@ -1,7 +1,7 @@
mindspore.ops.MaskedFill
=========================
.. py:class:: mindspore.ops.MaskedFill()
.. py:class:: mindspore.ops.MaskedFill
将掩码位置为True的位置填充指定的值。

View File

@ -1,7 +1,7 @@
mindspore.ops.Mul
=================
.. py:class:: mindspore.ops.Mul()
.. py:class:: mindspore.ops.Mul
两个Tensor逐元素相乘。

View File

@ -1,7 +1,7 @@
mindspore.ops.MultilabelMarginLoss
==================================
.. py:class:: mindspore.ops.MultilabelMarginLoss(reduction='none')
.. py:class:: mindspore.ops.MultilabelMarginLoss(reduction='mean')
二维卷积层。

View File

@ -1,5 +1,5 @@
mindspore.ops.Mvlgamma
==================================
=======================
.. py:class:: mindspore.ops.Mvlgamma

View File

@ -3,7 +3,9 @@ mindspore.ops.NextAfter
.. py:class:: mindspore.ops.NextAfter
返回 `x2` 方向上查找的 `x1` 的下一个可表示值的数字。
逐元素返回 `x1` 指向 `x2` 的下一个可表示值符点值。
比如有两个数 :math:`a` :math:`b` 数据类型为float32。并且设float32数据类型的可表示值增量为 :math:`eps` 。如果 :math:`a < b` ,那么 :math:`a` 指向 :math:`b` 的下一个可表示值就是 :math:`a+eps` :math:`b` 指向 :math:`a` 的下一个可表示值就是 :math:`b-eps`
.. math::
out_{i} = nextafter{x1_{i}, x2_{i}}

View File

@ -1,7 +1,7 @@
mindspore.ops.Nonzero
======================
.. py:class:: mindspore.ops.Nonzero()
.. py:class:: mindspore.nn.Nonzero
计算输入Tensor中所有非零元素的下标。

View File

@ -1,7 +1,7 @@
mindspore.ops.OnesLike
======================
.. py:class:: mindspore.ops.OnesLike()
.. py:class:: mindspore.ops.OnesLike
返回值为1的Tensorshape和数据类型与输入相同。

View File

@ -1,7 +1,7 @@
mindspore.ops.PReLU
===================
.. py:class:: mindspore.ops.PReLU()
.. py:class:: mindspore.ops.PReLU
带参数的线性修正单元激活函数Parametric Rectified Linear Unit activation function

View File

@ -1,7 +1,7 @@
mindspore.ops.Pow
==================
.. py:class:: mindspore.ops.Pow()
.. py:class:: mindspore.ops.Pow
计算 `x` 中每个元素的 `y` 次幂。

View File

@ -3,7 +3,7 @@ mindspore.ops.RandomGamma
.. py:class:: mindspore.ops.RandomGamma(seed=0, seed2=0)
根据概率密度函数分布生成随机正值浮点数x
根据概率密度函数分布生成随机正值浮点数x。函数定义如下
.. math::

View File

@ -3,7 +3,7 @@ mindspore.ops.RandomPoisson
.. py:class:: mindspore.ops.RandomPoisson(seed=0, seed2=0, dtype=mindspore.int64)
根据离散概率密度函数分布生成随机非负数浮点数i
根据离散概率密度函数分布生成随机非负数浮点数i。函数定义如下
.. math::
\text{P}(i|μ) = \frac{\exp(-μ)μ^{i}}{i!}

View File

@ -1,7 +1,7 @@
mindspore.ops.ReLUV2
====================
.. py:class:: mindspore.ops.ReLUV2()
.. py:class:: mindspore.ops.ReLUV2
ReLUV2接口已经弃用请使用 :class:`mindspore.ops.ReLU` 替代。

View File

@ -13,7 +13,7 @@ mindspore.ops.Receive
- **src_rank** (int) - 标识设备rank的所需整数。
- **shape** (list[int]) - 标识要接收的Tensor的shape的所需列表。
- **dtype** (Type) - 标识要接收的Tensor类型的必要类型。支持的类型int8、int16、int32、float16和float32。
- **group** (str可选) - 工作通信组。默认值:“hccl_world_group/nccl_world_group”。
- **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 +1,7 @@
mindspore.ops.Reshape
======================
.. py:class:: mindspore.ops.Reshape()
.. py:class:: mindspore.ops.Reshape
基于给定的shape对输入Tensor进行重新排列。

View File

@ -1,7 +1,7 @@
mindspore.ops.SeLU
==================
.. py:class:: mindspore.ops.SeLU()
.. py:class:: mindspore.ops.SeLU
激活函数SeLUScaled exponential Linear Unit

View File

@ -1,7 +1,7 @@
mindspore.ops.Sigmoid
=====================
.. py:class:: mindspore.ops.Sigmoid()
.. py:class:: mindspore.ops.Sigmoid
Sigmoid激活函数逐元素计算Sigmoid激活函数。Sigmoid函数定义为

View File

@ -1,7 +1,7 @@
mindspore.ops.Sub
=================
.. py:class:: mindspore.ops.Sub()
.. py:class:: mindspore.ops.Sub
逐元素用第一个输入Tensor减去第二个输入Tensor。

View File

@ -1,7 +1,7 @@
mindspore.ops.Tile
===================
.. py:class:: mindspore.ops.Tile()
.. py:class:: mindspore.ops.Tile
按照给定的次数复制输入Tensor。

View File

@ -13,7 +13,7 @@ mindspore.ops.TruncatedNormal
参数:
- **seed** (int可选) - 随机数种子。如果 `seed` 或者 `seed2` 被设置为非零则使用这个非零值。否则使用一个随机生成的种子。默认值0。
- **seed2** (int可选) - 另一个随机种子避免发生冲突。默认值0。
- **dtype** (int可选) - 指定输出类型。可选值为mindspore.float16、mindspore.float32和mindspore.float64。默认值mindspore.float32。
- **dtype** (mindspore.dtype,可选) - 指定输出类型。可选值为mindspore.float16、mindspore.float32和mindspore.float64。默认值mindspore.float32。
输入:
- **shape** (Tensor) - 生成Tensor的shape。数据类型必须是mindspore.int32或者mindspore.int64。

View File

@ -3,7 +3,7 @@ mindspore.ops.UniformInt
.. py:class:: mindspore.ops.UniformInt(seed=0, seed2=0)
根据均匀分布在区间 `[minval, maxval)` 中生成随机数,即根据离散概率函数分布
根据均匀分布在区间 `[minval, maxval)` 中生成随机数。离散概率函数定义如下
.. math::
\text{P}(i|a,b) = \frac{1}{b-a+1},

View File

@ -1,7 +1,7 @@
mindspore.ops.ZerosLike
=======================
.. py:class:: mindspore.ops.ZerosLike()
.. py:class:: mindspore.ops.ZerosLike
返回值为0的Tensor其shape和数据类型与输入Tensor相同。

View File

@ -5,7 +5,7 @@ mindspore.ops.blackman_window
布莱克曼窗口函数。
`window_length` 是一个Tensor控制返回的窗口大小其数据类型必须是整数。特别的,`window_length` 为1时返回的窗口只包含一个值`1``periodic` 决定返回的窗口是否会删除对称窗口的最后一个重复值,并准备用作带函数的周期窗口。因此,如果 `periodic` 为Truethe :math:`N`:math:`window\_length + 1`
`window_length` 是一个Tensor控制返回的窗口大小其数据类型必须是整数。特别当 `window_length` 为1时返回的窗口只包含一个值`1` `periodic` 决定返回的窗口是否会删除对称窗口的最后一个重复值,并准备用作该函数的周期窗口。因此,如果 `periodic` 为True :math:`N`:math:`window\_length + 1`
.. math::
w[n] = 0.42 - 0.5 cos(\frac{2\pi n}{N - 1}) + 0.08 cos(\frac{4\pi n}{N - 1})

View File

@ -18,6 +18,9 @@ mindspore.ops.conv2d
请参考论文 `Gradient Based Learning Applied to Document Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_ 。更详细的介绍,参见: `ConvNets <http://cs231n.github.io/convolutional-networks/>`_
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `C_{in}` = `C_{out}` = `group` 的约束条件。
参数:
- **inputs** (Tensor) - shape为 :math:`(N, C_{in}, H_{in}, W_{in})` 的Tensor。
- **weight** (Tensor) - 设置卷积核的大小为 :math:`(\text{kernel_size[0]}, \text{kernel_size[1]})` 则shape为 :math:`(C_{out}, C_{in}, \text{kernel_size[0]}, \text{kernel_size[1]})`
@ -32,9 +35,6 @@ mindspore.ops.conv2d
- **dilation** (Union(int, tuple[int]),可选) - 卷积核膨胀尺寸。数据类型为int或由2个int组成的tuple。若 :math:`k > 1` ,则卷积核间隔 `k` 个元素进行采样。垂直和水平方向上的 `k` ,其取值范围分别为[1, H]和[1, W]。默认值1。
- **group** (int可选) - 将过滤器拆分为组。默认值1。
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `in\_channels` = `out\_channels` = `group` 的约束条件。
返回:
Tensor卷积后的值。shape为 :math:`(N, C_{out}, H_{out}, W_{out})`

View File

@ -19,6 +19,9 @@ mindspore.ops.conv3d
详细内容请参考论文 `Gradient Based Learning Applied to Document Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_
.. note::
在Ascend平台上目前只支持深度卷积场景下的分组卷积运算。也就是说`group>1` 的场景下,必须要满足 `C_{in}` = `C_{out}` = `group` 的约束条件。
参数:
- **inputs** (Tensor) - shape为 :math:`(N, C_{in}, D_{in}, H_{in}, W_{in})` 的Tensor。
- **weight** (Tensor) - 设置卷积核的大小为 :math:`(\text{kernel_size[0]}, \text{kernel_size[1]}, \text{kernel_size[2]})` 则shape为 :math:`(C_{out}, C_{in}, \text{kernel_size[0]}, \text{kernel_size[1]}, \text{kernel_size[2]})`

View File

@ -779,7 +779,7 @@ Status CacheServer::BatchCacheRows(CacheRequest *rq) {
}
CacheServerRequest *cache_rq;
RETURN_IF_NOT_OK(GetFreeRequestTag(&cache_rq));
// Fill in details.
// Fill in detail.
cache_rq->type_ = BaseRequest::RequestType::kInternalCacheRow;
cache_rq->st_ = CacheServerRequest::STATE::PROCESS;
cache_rq->rq_.set_connection_id(connection_id);

View File

@ -65,8 +65,8 @@ abstract::ShapePtr BiasAddInferShape(const PrimitivePtr &primitive, const std::v
if ((data_format == static_cast<int64_t>(Format::NCDHW)) && input_shape.size() != x_max_rank &&
(is_ascend || is_cpu)) {
MS_EXCEPTION(ValueError) << "For '" << prim_name
<< "', NCDHW format only support 5-dims input in Ascend or CPU target, but got "
<< attr_value_str << ".";
<< "', NCDHW format only supports 5-D input on Ascend or CPU, but got a"
<< input_shape.size() << "-D input.";
}
if ((data_format == static_cast<int64_t>(Format::NHWC) || data_format == static_cast<int64_t>(Format::NCHW)) &&
(input_shape.size() > x_max_rank || input_shape.size() < x_min_rank)) {

View File

@ -157,7 +157,7 @@ class Conv2d(_Conv):
For more details, please refers to the paper `Gradient Based Learning Applied to Document
Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_.
.. note::
Note:
On Ascend platform, only group convolution in depthwise convolution scenarios is supported.
That is, when `group>1`, condition `in\_channels` = `out\_channels` = `group` must be satisfied.
@ -347,7 +347,7 @@ class Conv1d(_Conv):
For more details, please refers to the paper `Gradient Based Learning Applied to Document
Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_.
.. note::
Note:
On Ascend platform, only group convolution in depthwise convolution scenarios is supported.
That is, when `group>1`, condition `in\_channels` = `out\_channels` = `group` must be satisfied.
@ -535,6 +535,10 @@ class Conv3d(_Conv):
For more details, please refers to the paper `Gradient Based Learning Applied to Document
Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_.
Note:
On Ascend platform, only group convolution in depthwise convolution scenarios is supported.
That is, when `group>1`, condition `in\_channels` = `out\_channels` = `group` must be satisfied.
Args:
in_channels (int): The channel number of the input tensor of the Conv3d layer.
out_channels (int): The channel number of the output tensor of the Conv3d layer.

View File

@ -5657,7 +5657,7 @@ def stft(x, n_fft, hop_length=None, win_length=None, window=None, center=True,
if return_complex is None:
return_complex = _is_complex(x) or _is_complex(window)
if center:
_check_input_dtype("center", center, [bool], "")
_check_attr_dtype("center", center, [bool], "stft")
signal_dim = len(x.shape)
pad = n_fft // 2
if signal_dim == 1:

View File

@ -3762,13 +3762,11 @@ def conv2d(inputs, weight, pad_mode="valid", padding=0, stride=1, dilation=1, gr
The full kernel has shape :math:`(C_{out}, C_{in} / \text{group}, \text{kernel_size[0]}, \text{kernel_size[1]})`,
where `group` is the group number to split the input in the channel dimension.
If the `pad_mode` is set to be "valid", the output height and width will be
:math:`\left \lfloor{
If the `pad_mode` is set to be "valid", the output height and width will be :math:`\left \lfloor{
1 + \frac{H_{in} + \text{padding[0]} + \text{padding[1]} - \text{kernel_size[0]} -
(\text{kernel_size[0]} - 1) \times(\text{dilation[0]} - 1)} {\text { stride[0] }}} \right \rfloor` and
:math:`\left \lfloor{
1 + \frac{W_{in} + \text{padding[2]} + \text{padding[3]} - \text{kernel_size[1]} -
:math:`\left \lfloor{1 + \frac{W_{in} + \text{padding[2]} + \text{padding[3]} - \text{kernel_size[1]} -
(\text{kernel_size[1]} - 1) \times(\text{dilation[1]} - 1)} {\text { stride[1] }}} \right \rfloor` respectively.
Where :math:`dilation` is Spacing between kernel elements, :math:`stride` is The step length of each step,
@ -3780,6 +3778,10 @@ def conv2d(inputs, weight, pad_mode="valid", padding=0, stride=1, dilation=1, gr
<http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_. More detailed introduction can be found here:
`ConvNets <http://cs231n.github.io/convolutional-networks/>`_ .
Note:
On Ascend platform, only group convolution in depthwise convolution scenarios is supported.
That is, when `group>1`, condition `C_{in}` = `C_{out}` = `group` must be satisfied.
Args:
inputs (Tensor): Tensor of shape :math:`(N, C_{in}, H_{in}, W_{in})`.
weight (Tensor): Set size of kernel is :math:`(\text{kernel_size[0]}, \text{kernel_size[1]})`,
@ -3789,9 +3791,8 @@ def conv2d(inputs, weight, pad_mode="valid", padding=0, stride=1, dilation=1, gr
- same: Adopts the way of completion. The height and width of the output will be equal to
the input `x` divided by stride. The padding will be evenly calculated in top and bottom,
left and right possiblily.
Otherwise, the last extra padding will be calculated from the bottom and the right side.
If this mode is set, `padding` must be 0.
left and right possiblily. Otherwise, the last extra padding will be calculated from the bottom
and the right side. If this mode is set, `padding` must be 0.
- valid: Adopts the way of discarding. The possible largest height and width of output will be returned
without padding. Extra pixels will be discarded. If this mode is set, `padding` must be 0.
@ -3799,10 +3800,9 @@ def conv2d(inputs, weight, pad_mode="valid", padding=0, stride=1, dilation=1, gr
- pad: Implicit paddings on both sides of the input `x`. The number of `padding` will be padded to the input
Tensor borders. `padding` must be greater than or equal to 0.
padding (Union(int, tuple[int]), optional): Implicit paddings on both sides of the input `x`.
If `padding` is one integer,
the paddings of top, bottom, left and right are the same, equal to padding. If `padding` is a tuple
with four integers, the paddings of top, bottom, left and right will be equal to padding[0],
padding[1], padding[2], and padding[3] accordingly. Default: 0.
If `padding` is one integer, the paddings of top, bottom, left and right are the same, equal to padding.
If `padding` is a tuple with four integers, the paddings of top, bottom, left and right will be equal
to padding[0], padding[1], padding[2], and padding[3] accordingly. Default: 0.
stride (Union(int, tuple[int]), optional): The distance of kernel moving, an int number that represents
the height and width of movement are both strides, or a tuple of two int numbers that
represent height and width of movement respectively. Default: 1.
@ -4063,7 +4063,7 @@ def batch_norm(input_x, running_mean, running_var, weight, bias, training=False,
then "reserve_space_1" and "reserve_space_2" have the same value as "mean" and "variance" respectively.
- For Ascend 310, the result accuracy fails to reach 1 due to the square root instruction.
.. note::
Note:
- If `training` is `False`, `weight`, `bias`, `running_mean` and `running_var` are Tensors.
- If `training` is `True`, `weight`, `bias`, `running_mean` and `running_var` are Parameters.
@ -4231,6 +4231,10 @@ def conv3d(inputs, weight, pad_mode="valid", padding=0, stride=1, dilation=1, gr
For more details, please refers to the paper `Gradient Based Learning Applied to Document
Recognition <http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf>`_ .
Note:
On Ascend platform, only group convolution in depthwise convolution scenarios is supported.
That is, when `group>1`, condition `C_{in}` = `C_{out}` = `group` must be satisfied.
Args:
inputs (Tensor): Tensor of shape :math:`(N, C_{in}, D_{in}, H_{in}, W_{in})`.
weight (Tensor): Set size of kernel is :math:`(\text{kernel_size[0]}, \text{kernel_size[1]},

View File

@ -473,7 +473,8 @@ class Receive(PrimitiveWithInfer):
shape (list[int]): A required list identifying the shape of the tensor to be received.
dtype (Type): A required Type identifying the type of the tensor to be received. The supported types:
int8, int16, int32, float16, float32.
group (str, optional): The communication group to work on. Default: "hccl_world_group/nccl_world_group".
group (str, optional): The communication group to work on.
Default: "hccl_world_group" on Ascend, "nccl_world_group" on GPU.
Inputs:
- **input_x** (Tensor) - The shape of tensor is :math:`(x_1, x_2, ..., x_R)`.

View File

@ -427,7 +427,7 @@ class Im2Col(Primitive):
The `pads`, `strides` and `dilations` arguments specify
how the sliding blocks are retrieved.
.. note::
Note:
Currently, only 4-D input tensors (batched image-like tensors) are supported.
Args:

View File

@ -635,7 +635,7 @@ class ResizeLinear1D(Primitive):
r"""
Using the linear interpolate method resize the input tensor 'x'.
For general resize, refer to :func:`mindspore.ops.interpolate` for more detail.
For general resize, refer to :func:`mindspore.ops.interpolate` for more details.
.. warning::
This is an experimental feature and is subjected to change.

View File

@ -28,7 +28,7 @@ class ScalarCast(PrimitiveWithInfer):
"""
Casts the input scalar to another type.
Refer to :func:`mindspore.ops.scalar_cast` for more detail.
Refer to :func:`mindspore.ops.scalar_cast` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``

View File

@ -150,7 +150,7 @@ class Ger(Primitive):
shape :math:`(m,)` and `x2` is a 1D Tensor of shape :math:`(n,)`, then `output` must be a 2D Tensor of shape
:math:`(m, n)`.
Refer to :func:`mindspore.ops.ger` for more detail.
Refer to :func:`mindspore.ops.ger` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -177,7 +177,7 @@ class Add(_MathBinaryOp):
r"""
Adds two input tensors element-wise.
Refer to :func:`mindspore.ops.add` for more detail.
Refer to :func:`mindspore.ops.add` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -410,7 +410,7 @@ class AssignAdd(Primitive):
"""
Updates a `Parameter` by adding a value to it.
Refer to :func:`mindspore.ops.assign_add` for more detail.
Refer to :func:`mindspore.ops.assign_add` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -448,7 +448,7 @@ class AssignSub(Primitive):
"""
Updates a `Parameter` by subtracting a value from it.
Refer to :func:`mindspore.ops.assign_sub` for more detail.
Refer to :func:`mindspore.ops.assign_sub` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1368,7 +1368,7 @@ class Cdist(Primitive):
"""
Computes batched the p-norm distance between each pair of the two collections of row vectors.
Refer to :func:`mindspore.ops.cdist` for more detail.
Refer to :func:`mindspore.ops.cdist` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1401,7 +1401,7 @@ class LpNorm(Primitive):
.. math::
output = sum(abs(input)**p)**(1/p)
Refer to :func:`mindspore.ops.norm` for more detail.
Refer to :func:`mindspore.ops.norm` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1724,7 +1724,7 @@ class AddN(Primitive):
"""
Computes addition of all input tensors element-wise.
Refer to :func:`mindspore.ops.addn` for more detail.
Refer to :func:`mindspore.ops.addn` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1765,7 +1765,7 @@ class AccumulateNV2(Primitive):
"""
Computes accumulation of all input tensors element-wise.
Refer to :func:`mindspore.ops.accumulate_n` for more detail.
Refer to :func:`mindspore.ops.accumulate_n` for more details.
Supported Platforms:
``Ascend``
@ -1807,7 +1807,7 @@ class Neg(Primitive):
"""
Returns a tensor with negative values of the input tensor element-wise.
Refer to :func:`mindspore.ops.neg` for more detail.
Refer to :func:`mindspore.ops.neg` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1928,7 +1928,7 @@ class InplaceAdd(PrimitiveWithInfer):
"""
Adds `v` into specified rows of `x`. Computes `y` = `x`; y[i,] += `v`.
Refer to :func:`mindspore.ops.inplace_add` for more detail.
Refer to :func:`mindspore.ops.inplace_add` for more details.
Supported Platforms:
``Ascend`` ``CPU``
@ -1985,7 +1985,7 @@ class InplaceIndexAdd(Primitive):
Adds tensor `updates` to specified axis and indices of tensor `var`. The axis should be in [0, len(var.dim) - 1],
and indices should be in [0, the size of `var` - 1] at the axis dimension.
Refer to :func:`mindspore.ops.inplace_index_add` for more detail.
Refer to :func:`mindspore.ops.inplace_index_add` for more details.
Supported Platforms:
``CPU``
@ -2020,7 +2020,7 @@ class InplaceSub(PrimitiveWithInfer):
"""
Subtracts `v` into specified rows of `x`. Computes `y` = `x`; y[i,] -= `v`.
Refer to :func:`mindspore.ops.inplace_sub` for more detail.
Refer to :func:`mindspore.ops.inplace_sub` for more details.
Supported Platforms:
``Ascend`` ``CPU``
@ -2077,7 +2077,7 @@ class Sub(_MathBinaryOp):
r"""
Subtracts the second input tensor from the first input tensor element-wise.
Refer to :func:`mindspore.ops.sub` for more detail.
Refer to :func:`mindspore.ops.sub` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2105,7 +2105,7 @@ class Mul(_MathBinaryOp):
r"""
Multiplies two tensors element-wise.
Refer to :func:`mindspore.ops.mul` for more detail.
Refer to :func:`mindspore.ops.mul` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2361,7 +2361,7 @@ class Pow(Primitive):
r"""
Calculates the `y` power of each element in `x`.
Refer to :func:`mindspore.ops.pow` for more detail.
Refer to :func:`mindspore.ops.pow` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2403,7 +2403,7 @@ class Exp(Primitive):
r"""
Returns exponential of a tensor element-wise.
Refer to :func:`mindspore.ops.exp` for more detail.
Refer to :func:`mindspore.ops.exp` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2440,7 +2440,7 @@ class Logit(Primitive):
\end{cases}
\end{align}
Refer to :func:`mindspore.ops.logit` for more detail.
Refer to :func:`mindspore.ops.logit` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -2664,7 +2664,7 @@ class Expm1(Primitive):
r"""
Returns exponential then minus 1 of a tensor element-wise.
Refer to :func:`mindspore.ops.expm1` for more detail.
Refer to :func:`mindspore.ops.expm1` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2782,7 +2782,7 @@ class Log(Primitive):
"""
Returns the natural logarithm of a tensor element-wise.
Refer to :func:`mindspore.ops.log` for more detail.
Refer to :func:`mindspore.ops.log` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2809,7 +2809,7 @@ class Log1p(Primitive):
r"""
Returns the natural logarithm of one plus the input tensor element-wise.
Refer to :func:`mindspore.ops.log1p` for more detail.
Refer to :func:`mindspore.ops.log1p` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2911,7 +2911,7 @@ class Erf(Primitive):
r"""
Computes the Gauss error function of `x` element-wise.
Refer to :func:`mindspore.ops.erf` for more detail.
Refer to :func:`mindspore.ops.erf` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2934,7 +2934,7 @@ class Erfc(Primitive):
r"""
Computes the complementary error function of `x` element-wise.
Refer to :func:`mindspore.ops.erfc` for more detail.
Refer to :func:`mindspore.ops.erfc` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2957,7 +2957,7 @@ class Minimum(_MathBinaryOp):
r"""
Computes the minimum of input tensors element-wise.
Refer to :func:`mindspore.ops.minimum` for more detail.
Refer to :func:`mindspore.ops.minimum` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2992,7 +2992,7 @@ class Maximum(_MathBinaryOp):
"""
Computes the maximum of input tensors element-wise.
Refer to :func:`mindspore.ops.maximum` for more detail.
Refer to :func:`mindspore.ops.maximum` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3018,7 +3018,7 @@ class RealDiv(_MathBinaryOp):
"""
Divides the first input tensor by the second input tensor in floating-point type element-wise.
Refer to :func:`mindspore.ops.div` for more detail.
Refer to :func:`mindspore.ops.div` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3050,7 +3050,7 @@ class Div(_MathBinaryOp):
out_{i} = \frac{x_i}{y_i}
.. note::
Note:
- Inputs of `x` and `y` comply with the implicit type conversion rules to make the data types consistent.
- The inputs must be two tensors or one tensor and one scalar.
- When the inputs are two tensors,
@ -3259,7 +3259,7 @@ class FloorDiv(Primitive):
"""
Divides the first input tensor by the second input tensor element-wise and round down to the closest integer.
Refer to :func:`mindspore.ops.floor_div` for more detail.
Refer to :func:`mindspore.ops.floor_div` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3441,7 +3441,7 @@ class Floor(Primitive):
r"""
Rounds a tensor down to the closest integer element-wise.
Refer to :func:`mindspore.ops.floor` for more detail.
Refer to :func:`mindspore.ops.floor` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3464,7 +3464,7 @@ class FloorMod(Primitive):
r"""
Computes the remainder of division element-wise, and it's a flooring divide.
Refer to :func:`mindspore.ops.floor_mod` for more detail.
Refer to :func:`mindspore.ops.floor_mod` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3490,7 +3490,7 @@ class Ceil(PrimitiveWithInfer):
r"""
Rounds a tensor up to the closest integer element-wise.
Refer to :func:`mindspore.ops.ceil` for more detail.
Refer to :func:`mindspore.ops.ceil` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3605,7 +3605,7 @@ class Xlogy(Primitive):
Computes the first input tensor multiplied by the logarithm of second input tensor element-wise.
Returns zero when `x` is zero.
Refer to :func:`mindspore.ops.xlogy` for more detail.
Refer to :func:`mindspore.ops.xlogy` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3630,7 +3630,7 @@ class Acosh(Primitive):
r"""
Computes inverse hyperbolic cosine of the inputs element-wise.
Refer to :func:`mindspore.ops.acosh` for more detail.
Refer to :func:`mindspore.ops.acosh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3656,7 +3656,7 @@ class Cosh(Primitive):
r"""
Computes hyperbolic cosine of input element-wise.
Refer to :func:`mindspore.ops.cosh` for more detail.
Refer to :func:`mindspore.ops.cosh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3678,7 +3678,7 @@ class Asinh(Primitive):
r"""
Computes inverse hyperbolic sine of the input element-wise.
Refer to :func:`mindspore.ops.asinh` for more detail.
Refer to :func:`mindspore.ops.asinh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3701,7 +3701,7 @@ class Sinc(Primitive):
r"""
Computes the normalized sinc of input.
Refer to :func:`mindspore.ops.sinc` for more detail.
Refer to :func:`mindspore.ops.sinc` for more details.
.. math::
@ -3743,7 +3743,7 @@ class Sinh(Primitive):
r"""
Computes hyperbolic sine of the input element-wise.
Refer to :func:`mindspore.ops.sinh` for more detail.
Refer to :func:`mindspore.ops.sinh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3781,7 +3781,7 @@ class Equal(Primitive):
r"""
Computes the equivalence between two tensors element-wise.
Refer to :func:`mindspore.ops.equal` for more detail.
Refer to :func:`mindspore.ops.equal` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3903,7 +3903,7 @@ class NotEqual(Primitive):
"""
Computes the non-equivalence of two tensors element-wise.
Refer to :func:`mindspore.ops.ne` for more detail.
Refer to :func:`mindspore.ops.ne` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3934,7 +3934,7 @@ class Greater(PrimitiveWithCheck):
r"""
Compare the value of the input parameters :math:`x,y` element-wise, and the output result is a bool value.
Refer to :func:`mindspore.ops.gt` for more detail.
Refer to :func:`mindspore.ops.gt` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3969,7 +3969,7 @@ class GreaterEqual(PrimitiveWithCheck):
r"""
Computes the boolean value of :math:`x >= y` element-wise.
Refer to :func:`mindspore.ops.ge` for more detail.
Refer to :func:`mindspore.ops.ge` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4001,7 +4001,7 @@ class Lerp(Primitive):
"""
Calculate the linear interpolation between two tensors based on the weight parameter.
Refer to :func:`mindspore.ops.lerp` for more detail.
Refer to :func:`mindspore.ops.lerp` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4063,7 +4063,7 @@ class Less(PrimitiveWithCheck):
r"""
Computes the boolean value of :math:`x < y` element-wise.
Refer to :func:`mindspore.ops.less` for more detail.
Refer to :func:`mindspore.ops.less` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4095,7 +4095,7 @@ class LessEqual(PrimitiveWithCheck):
r"""
Computes the boolean value of :math:`x <= y` element-wise.
Refer to :func:`mindspore.ops.le` for more detail.
Refer to :func:`mindspore.ops.le` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4127,7 +4127,7 @@ class LogicalNot(Primitive):
"""
Computes the "logical NOT" of a tensor element-wise.
Refer to :func:`mindspore.ops.logical_not` for more detail.
Refer to :func:`mindspore.ops.logical_not` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4150,7 +4150,7 @@ class LogicalAnd(_LogicBinaryOp):
r"""
Computes the "logical AND" of two tensors element-wise.
Refer to :func:`mindspore.ops.logical_and` for more detail.
Refer to :func:`mindspore.ops.logical_and` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4169,7 +4169,7 @@ class LogicalOr(_LogicBinaryOp):
"""
Computes the "logical OR" of two tensors element-wise.
Refer to :func:`mindspore.ops.logical_or` for more detail.
Refer to :func:`mindspore.ops.logical_or` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4226,7 +4226,7 @@ class IsNan(Primitive):
r"""
Determines which elements are NaN for each position.
Refer to :func:`mindspore.ops.isnan` for more detail.
Refer to :func:`mindspore.ops.isnan` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4289,7 +4289,7 @@ class IsFinite(Primitive):
r"""
Determines which elements are finite for each position.
Refer to :func:`mindspore.ops.isfinite` for more detail.
Refer to :func:`mindspore.ops.isfinite` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4502,7 +4502,7 @@ class Cos(Primitive):
r"""
Computes cosine of input element-wise.
Refer to :func:`mindspore.ops.cos` for more detail.
Refer to :func:`mindspore.ops.cos` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4524,7 +4524,7 @@ class ACos(Primitive):
r"""
Computes arccosine of input tensors element-wise.
Refer to :func:`mindspore.ops.acos` for more detail.
Refer to :func:`mindspore.ops.acos` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4547,7 +4547,7 @@ class Sin(Primitive):
r"""
Computes sine of the input element-wise.
Refer to :func:`mindspore.ops.sin` for more detail.
Refer to :func:`mindspore.ops.sin` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4569,7 +4569,7 @@ class Asin(Primitive):
r"""
Computes arcsine of input tensors element-wise.
Refer to :func:`mindspore.ops.asin` for more detail.
Refer to :func:`mindspore.ops.asin` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4672,7 +4672,7 @@ class Abs(Primitive):
r"""
Returns absolute value of a tensor element-wise.
Refer to :func:`mindspore.ops.abs` for more detail.
Refer to :func:`mindspore.ops.abs` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4730,7 +4730,7 @@ class Round(Primitive):
r"""
Returns half to even of a tensor element-wise.
Refer to :func:`mindspore.ops.round` for more detailed.
Refer to :func:`mindspore.ops.round` for more detailsed.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4753,7 +4753,7 @@ class Tan(Primitive):
r"""
Computes tangent of `x` element-wise.
Refer to :func:`mindspore.ops.tan` for more detail.
Refer to :func:`mindspore.ops.tan` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -4776,7 +4776,7 @@ class Atan(Primitive):
r"""
Computes the trigonometric inverse tangent of the input element-wise.
Refer to :func:`mindspore.ops.atan` for more detail.
Refer to :func:`mindspore.ops.atan` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4802,7 +4802,7 @@ class Atanh(Primitive):
.. warning::
This is an experimental prototype that is subject to change and/or deletion.
Refer to :func:`mindspore.ops.atanh` for more detail.
Refer to :func:`mindspore.ops.atanh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4825,7 +4825,7 @@ class Atan2(_MathBinaryOp):
r"""
Returns arctangent of x/y element-wise.
Refer to :func:`mindspore.ops.atan2` for more detail.
Refer to :func:`mindspore.ops.atan2` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -4897,7 +4897,7 @@ class BitwiseAnd(_BitwiseBinaryOp):
r"""
Returns bitwise `and` of two tensors element-wise.
Refer to :func:`mindspore.ops.bitwise_and` for more detail.
Refer to :func:`mindspore.ops.bitwise_and` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -4916,7 +4916,7 @@ class BitwiseOr(_BitwiseBinaryOp):
r"""
Returns bitwise `or` of two tensors element-wise.
Refer to :func:`mindspore.ops.bitwise_or` for more detail.
Refer to :func:`mindspore.ops.bitwise_or` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -4935,7 +4935,7 @@ class BitwiseXor(_BitwiseBinaryOp):
r"""
Returns bitwise `xor` of two tensors element-wise.
Refer to :func:`mindspore.ops.bitwise_xor` for more detail.
Refer to :func:`mindspore.ops.bitwise_xor` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -5448,7 +5448,7 @@ class LinSpace(Primitive):
Returns a Tensor whose value is `num` evenly spaced in the interval `start` and `stop` (including `start` and
`stop`), and the length of the output Tensor is `num`.
Refer to :func:`mindspore.ops.linspace` for more detail.
Refer to :func:`mindspore.ops.linspace` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -5565,7 +5565,7 @@ class MatrixDeterminant(Primitive):
"""
Computes the determinant of one or more square matrices.
Refer to :func:`mindspore.ops.matrix_determinant` for more detail.
Refer to :func:`mindspore.ops.matrix_determinant` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -5959,7 +5959,7 @@ class Trunc(Primitive):
"""
Returns a new tensor with the truncated integer values of the elements of input.
Refer to :func:`mindspore.ops.trunc` for more detail.
Refer to :func:`mindspore.ops.trunc` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -6555,7 +6555,7 @@ class CholeskyInverse(Primitive):
"""
Returns the inverse of the positive definite matrix using cholesky matrix factorization.
Refer to :func::`mindspore.ops.cholesky_inverse` for more detail.
Refer to :func::`mindspore.ops.cholesky_inverse` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -6769,7 +6769,7 @@ class SparseSegmentMean(Primitive):
"""
Computes the mean along sparse segments of a Tensor.
Refer to :func:`mindspore.ops.sparse_segment_mean` for more detail.
Refer to :func:`mindspore.ops.sparse_segment_mean` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -6839,7 +6839,7 @@ class Bernoulli(Primitive):
"""
Randomly set the elements of output to 0 or 1 with the probability of P which follows the Bernoulli distribution.
Refer to :func:`mindspore.ops.bernoulli` for more detail.
Refer to :func:`mindspore.ops.bernoulli` for more details.
Supported Platforms:
``GPU``
@ -6954,7 +6954,7 @@ class Cholesky(Primitive):
Computes the Cholesky decomposition of a symmetric positive-definite matrix `A`
or for batches of symmetric positive-definite matrices.
Refer to :func::`mindspore.ops.cholesky` for more detail.
Refer to :func::`mindspore.ops.cholesky` for more details.
Supported Platforms:
``Ascend`` ``CPU``
@ -7234,7 +7234,12 @@ class Polar(Primitive):
class NextAfter(Primitive):
"""
Returns the next representable value after `x1` in the direction of `x2`.
Returns the next representable floating-point value after `x1` towards `x2` element-wise.
Say there are two float32 numbers :math:`a`, :math:`b`, and let the
representable delta of float32 datatype is :math:`eps`. If :math:`a < b`,
then the next representable of :math:`a` towards :math:`b` is :math:`a+eps`,
the next representable of :math:`b` towards :math:`a` is :math:`b-eps`.
.. math::

View File

@ -302,7 +302,7 @@ class AdaptiveAvgPool2D(AdaptiveAvgPool2DV1):
r"""
2D adaptive average pooling for temporal data.
Refer to :func:`mindspore.ops.adaptive_avg_pool2d` for more detail.
Refer to :func:`mindspore.ops.adaptive_avg_pool2d` for more details.
Supported Platforms:
``GPU``
@ -415,7 +415,7 @@ class AdaptiveMaxPool3D(Primitive):
r"""
Applies a 3D adaptive max pooling over an input signal composed of several input planes.
Refer to :func:`mindspore.ops.adaptive_max_pool3d` for more detail.
Refer to :func:`mindspore.ops.adaptive_max_pool3d` for more details.
Supported Platforms:
``GPU`` ``CPU``
@ -446,7 +446,7 @@ class Softmax(Primitive):
r"""
Applies the Softmax operation to the input tensor on the specified axis.
Refer to :func:`mindspore.ops.softmax` for more detail.
Refer to :func:`mindspore.ops.softmax` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -474,7 +474,7 @@ class LogSoftmax(Primitive):
r"""
Log Softmax activation function.
Refer to :func:`mindspore.ops.log_softmax` for more detail.
Refer to :func:`mindspore.ops.log_softmax` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -843,7 +843,7 @@ class HSwish(Primitive):
r"""
Hard swish activation function.
Refer to :func:`mindspore.ops.hardswish` for more detail.
Refer to :func:`mindspore.ops.hardswish` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -931,7 +931,7 @@ class Tanh(Primitive):
Computes hyperbolic tangent of input element-wise.
Refer to :func:`mindspore.ops.tanh` for more detail.
Refer to :func:`mindspore.ops.tanh` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -1340,7 +1340,7 @@ class Conv2D(Primitive):
r"""
2D convolution layer.
Refer to :func:`mindspore.ops.conv2d` for more detail.
Refer to :func:`mindspore.ops.conv2d` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -2251,7 +2251,7 @@ class AvgPool(_Pool):
r"""
Average pooling operation.
Refer to :func:`mindspore.ops.avg_pool2d` for more detail.
Refer to :func:`mindspore.ops.avg_pool2d` for more details.
Args:
kernel_size (Union[int, tuple[int]]): The size of kernel used to take the average value,
@ -2972,7 +2972,7 @@ class SmoothL1Loss(Primitive):
r"""
Calculate the smooth L1 loss, and the L1 loss function has robustness.
Refer to :func:`mindspore.ops.smooth_l1_loss` for more detail.
Refer to :func:`mindspore.ops.smooth_l1_loss` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -3645,7 +3645,7 @@ class ResizeBilinear(PrimitiveWithInfer):
The resizing only affects the lower two dimensions which represent the height and width. The input images
can be represented by different data types, but the data types of output images are always float32.
For general resize, refer to :func:`mindspore.ops.interpolate` for more detail.
For general resize, refer to :func:`mindspore.ops.interpolate` for more details.
.. warning::
This interface does not support dynamic shape and is subject to change or deletion,
@ -3957,7 +3957,7 @@ class FastGeLU(Primitive):
r"""
Fast Gaussian Error Linear Units activation function.
Refer to :func:`mindspore.ops.fast_gelu` for more detail.
Refer to :func:`mindspore.ops.fast_gelu` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -4071,7 +4071,7 @@ class LSTM(PrimitiveWithInfer):
"""
Performs the Long Short-Term Memory (LSTM) on the input.
For detailed information, please refer to :class:`mindspore.nn.LSTM`.
For detailsed information, please refer to :class:`mindspore.nn.LSTM`.
Args:
input_size (int): Number of features of input.
@ -4079,8 +4079,8 @@ class LSTM(PrimitiveWithInfer):
num_layers (int): Number of layers of stacked LSTM.
has_bias (bool): Whether the cell has bias `b_ih` and `b_hh`.
bidirectional (bool): Specifies whether it is a bidirectional LSTM.
dropout (float, optional): If not 0, append `Dropout` layer on the outputs of each
LSTM layer except the last layer. The range of dropout is [0.0, 1.0]. Default: 0.0.
dropout (float): If not 0, append `Dropout` layer on the outputs of each
LSTM layer except the last layer. The range of dropout is [0.0, 1.0].
Inputs:
- **input** (Tensor) - Tensor of shape (seq_len, batch_size, `input_size`) or
@ -4316,7 +4316,7 @@ class Pad(Primitive):
r"""
Pads the input tensor according to the paddings.
Refer to :func:`mindspore.ops.pad` for more detail. Use :func:`mindspore.ops.pad` instead if `paddings` has
Refer to :func:`mindspore.ops.pad` for more details. Use :func:`mindspore.ops.pad` instead if `paddings` has
negative values.
Args:
@ -6517,7 +6517,7 @@ class ApplyProximalGradientDescent(Primitive):
r"""
Updates relevant entries according to the FOBOS(Forward Backward Splitting) algorithm.
Refer to the paper `Efficient Learning using Forward-Backward Splitting
<http://papers.nips.cc//paper/3793-efficient-learning-using-forward-backward-splitting.pdf>`_ for more detail.
<http://papers.nips.cc//paper/3793-efficient-learning-using-forward-backward-splitting.pdf>`_ for more details.
.. math::
\begin{array}{ll} \\
@ -6935,7 +6935,7 @@ class Dropout(PrimitiveWithCheck):
with probability 1-`keep_prob` from a Bernoulli distribution. It plays the
role of reducing neuron correlation and avoid overfitting.
Refer to :func:`mindspore.ops.dropout` for more detail.
Refer to :func:`mindspore.ops.dropout` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -6974,7 +6974,7 @@ class Dropout2D(PrimitiveWithInfer):
Note:
The keep probability :math:`keep\_prob` is equal to :math:`1 - p` in :func:`mindspore.ops.dropout2d`.
Refer to :func:`mindspore.ops.dropout2d` for more detail.
Refer to :func:`mindspore.ops.dropout2d` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -7007,7 +7007,7 @@ class Dropout3D(PrimitiveWithInfer):
Note:
The keep probability :math:`keep\_prob` is equal to :math:`1 - p` in :func:`mindspore.ops.dropout3d`.
Refer to :func:`mindspore.ops.dropout3d` for more detail.
Refer to :func:`mindspore.ops.dropout3d` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -7118,7 +7118,7 @@ class CTCGreedyDecoder(Primitive):
r"""
Performs greedy decoding on the logits given in inputs.
Refer to :func:`mindspore.ops.ctc_greedy_decoder` for more detail.
Refer to :func:`mindspore.ops.ctc_greedy_decoder` for more details.
Supported Platforms:
``Ascend`` ``CPU``
@ -7449,7 +7449,7 @@ class InTopK(Primitive):
r"""
Determines whether the targets are in the top `k` predictions.
Refer to :func:`mindspore.ops.intopk` for more detail.
Refer to :func:`mindspore.ops.intopk` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -7649,7 +7649,7 @@ class Conv3D(Primitive):
r"""
3D convolution layer.
Refer to :func:`mindspore.ops.conv3d` for more detail.
Refer to :func:`mindspore.ops.conv3d` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -8368,7 +8368,7 @@ class SoftShrink(Primitive):
r"""
Applies the SoftShrink function element-wise.
Refer to :func:`mindspore.ops.soft_shrink` for more detail.
Refer to :func:`mindspore.ops.soft_shrink` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -8396,7 +8396,7 @@ class HShrink(Primitive):
r"""
Hard Shrink activation function.
Refer to :func:`mindspore.ops.hardshrink` for more detail.
Refer to :func:`mindspore.ops.hardshrink` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``
@ -9561,7 +9561,7 @@ class DeformableOffsets(Primitive):
r"""
Computes the deformed convolution output with the expected input.
Refer to :func:`mindspore.ops.deformable_conv2d` for more detail.
Refer to :func:`mindspore.ops.deformable_conv2d` for more details.
Supported Platforms:
``Ascend`` ``CPU`` ``GPU``

View File

@ -27,7 +27,7 @@ class Assign(Primitive):
"""
Assigns `Parameter` with a value.
Refer to :func:`mindspore.ops.assign` for more detail.
Refer to :func:`mindspore.ops.assign` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -329,10 +329,8 @@ class CheckValid(Primitive):
"""
Checks bounding box.
Checks whether the bounding box cross data and data border are valid.
.. warning::
specifying the valid boundary (heights x ratio, weights x ratio).
Checks whether the bounding boxes specified by `bboxes` is valid.
Returns True if the box is within borders specified by `img_metas`, False if not.
Inputs:
- **bboxes** (Tensor) - Bounding boxes tensor with shape (N, 4). "N" indicates the number of
@ -385,7 +383,7 @@ class IOU(Primitive):
Computes the intersection over union (IOU) or the intersection over foreground (IOF) based on the ground-truth and
predicted regions.
Refer to :func:`mindspore.ops.iou` for more detail.
Refer to :func:`mindspore.ops.iou` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -542,7 +540,7 @@ class StopGradient(Primitive):
StopGradient is used for eliminating the effect of a value on the gradient,
such as truncating the gradient propagation from an output of a function.
Refer to :func:`mindspore.ops.stop_gradient` for more detail.
Refer to :func:`mindspore.ops.stop_gradient` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``

View File

@ -136,7 +136,7 @@ class StandardNormal(Primitive):
r"""
Generates random numbers according to the standard Normal (or Gaussian) random number distribution.
Refer to :func:`mindspore.ops.standard_normal` for more detail.
Refer to :func:`mindspore.ops.standard_normal` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -733,7 +733,7 @@ class RandomChoiceWithMask(Primitive):
"""
Generates a random sample as index tensor with a mask tensor from a given tensor.
Refer to :func:`mindspore.ops.choice_with_mask` for more detail.
Refer to :func:`mindspore.ops.choice_with_mask` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
@ -874,7 +874,7 @@ class MultinomialWithReplacement(Primitive):
The rows of input do not need to sum to one (in which case we use the values as weights),
but must be non-negative, finite and have a non-zero sum.
Refer to :func:`mindspore.ops.multinomial_with_replacement` for more detail.
Refer to :func:`mindspore.ops.multinomial_with_replacement` for more details.
Supported Platforms:
``Ascend`` ``CPU``
@ -901,7 +901,7 @@ class UniformCandidateSampler(PrimitiveWithInfer):
This function samples a set of classes(sampled_candidates) from [0, range_max-1] based on uniform distribution.
Refer to :func:`mindspore.ops.uniform_candidate_sampler` for more detail.
Refer to :func:`mindspore.ops.uniform_candidate_sampler` for more details.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``