modify format
This commit is contained in:
parent
f1218b8847
commit
bcc7ac885e
|
@ -16,7 +16,7 @@ mindspore.dataset.audio.AmplitudeToDB
|
|||
- **top_db** (float, 可选) - 最小截止分贝值,取值为非负数。默认值:80.0。
|
||||
|
||||
异常:
|
||||
- **TypeError** - 当 `stype` 的类型不为 :class:`mindspore.dataset.audio.utils.ScaleType` 。
|
||||
- **TypeError** - 当 `stype` 的类型不为 :class:`mindspore.dataset.audio.ScaleType` 。
|
||||
- **TypeError** - 当 `ref_value` 的类型不为float。
|
||||
- **ValueError** - 当 `ref_value` 不为正数。
|
||||
- **TypeError** - 当 `amin` 的类型不为float。
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
.. warning::
|
||||
此算子为实验性算子,将来可能面临更改或删除。
|
||||
|
||||
输入:
|
||||
输入:
|
||||
- **x** (Tensor) - 输入Tensor。数据类型为 `float16` 、 `float32` 或者 `float64` 。
|
||||
|
||||
输出:
|
||||
输出:
|
||||
Tensor, 和输入 `x` 具有相同的数据类型。
|
||||
|
||||
异常:
|
||||
异常:
|
||||
- **TypeError** - 如果输入 `x` 不是Tensor。
|
||||
- **TypeError** - 输入输入 `x` 的数据类型不是 `float16` 、 `float32` 或者 `float64` 。
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
对输入的shape为 :math:`(N, C_{in}, H_{in}, W_{in})` ,应用2-D膨胀,其中,
|
||||
|
||||
:math:`N` 为batch大小, :math:`H` 为高度, :math:`W`为宽度, :math:`C` 为通道数量。
|
||||
:math:`N` 为batch大小, :math:`H` 为高度, :math:`W` 为宽度, :math:`C` 为通道数量。
|
||||
|
||||
给定kernel size :math:`ks = (h_{ker}, w_{ker})`, stride :math:`s = (s_0, s_1)`,和
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
- valid:采用丢弃的方式。没有填充时候输出为最大的高度和宽度。额外的像素点将被丢弃。
|
||||
|
||||
- **data_format** (str,可选) - 数据格式的值。目前只支持`NCHW`,默认值: `NCHW` 。
|
||||
- **data_format** (str,可选) - 数据格式的值。目前只支持 `NCHW`,默认值: `NCHW` 。
|
||||
|
||||
输入:
|
||||
- **x** (Tensor) - 输入数据。一个四维Tensor,数据类型为float16、float32,shape必须为
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
参数:
|
||||
- **compute_v** (bool,可选) - 如果为True,同时计算特征值和特征向量,如果为False,只计算特征值,默认值:False。
|
||||
|
||||
输入:
|
||||
输入:
|
||||
- **x** (Tensor) - 方阵。shape为 :math:`(*, N, N)`,数据类型支持
|
||||
float32、float64、complex64、complex128。
|
||||
|
||||
输出:
|
||||
输出:
|
||||
- **eigen_values** (Tensor) - shape为 :math:`(*, N)`,其中的每个向量代表对应矩阵的特征值,特征值之间没有顺序关系。
|
||||
- **eigen_vectors** (Tensor) - 如果 `compute_v` 为False,此为空Tensor,否则,为shape :math:`(*, N, N)` 的Tensor。
|
||||
其列表示相应特征值的规范化(单位长度)特征向量。
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
计算Tensor维度上元素的欧几里得范数,根据给定的轴对输入进行规约操作。
|
||||
|
||||
参数:
|
||||
- **keep_dims** (bool,可选) - 如果为True,被规约的轴保留为1,如果为False,不保留给定的这些轴,默认值:False。
|
||||
- **keep_dims** (bool,可选) - 如果为True,被规约的轴保留为1,如果为False,不保留给定的这些轴,默认值:False。
|
||||
|
||||
输入:
|
||||
- **x** (Tensor) - 输入Tensor,将被规约,数据类型为:float16、float32、float64、int8、int16、
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
- **uniform_noise** (bool,可选) - 可选的bool,指示是否应该使用均匀分布或高斯分布生成噪声。默认为True。
|
||||
- **noise** (str,可选) - 可选string,其值可以为: `uniform` 、 `gaussian` 和 `zero` 。
|
||||
窗口由输入大小和偏移决定,如果窗口与输入部分没有重叠,则填充随机噪声。当 `noise` 为 `uniform` 或者 `gaussian` ,
|
||||
其填充结果是变量。当 `noise`为 `zero` ,则 `uniform_noise` 必须为False,这样填充的噪声才是0,保证了结果的正确。
|
||||
其填充结果是变量。当 `noise` 为 `zero` ,则 `uniform_noise` 必须为False,这样填充的噪声才是0,保证了结果的正确。
|
||||
当 `uniform_noise` 为True, `noise` 仅可以为 `uniform` 。当 `uniform_noise` 为False, `noise` 可以为 `uniform` 、 `gaussian` 和 `zero` 。
|
||||
默认为 `uniform` 。
|
||||
|
||||
|
|
|
@ -12,22 +12,18 @@ mindspore.ops.FractionalMaxPoolWithFixedKsize
|
|||
详细内容请参考论文 `Fractional Max-Pooling <https://arxiv.org/pdf/1412.6071>`_ 。
|
||||
|
||||
参数:
|
||||
- **ksize** (Union[float, tuple]) - 用于取最大值的内核窗口的大小。目标 ksize 为 `H x W` 。ksize 可以是元组,也可以是 `K x K` 的单个K。
|
||||
- **ksize** (Union[int, tuple[int]]) - 用于取最大值的内核窗口的大小。目标 ksize 为 `H x W` 。ksize 可以是元组,也可以是 `K x K` 的单个K。
|
||||
指明了输入Tensor的窗口大小 `(H, W)` 。
|
||||
|
||||
- **output_shape** (Union[int, tuple]) - 目标输出shape为 `H x W` ,输出shape可以是一个元组,或者 `H x H` 的单个H。
|
||||
- **output_shape** (Union[int, tuple[int]]) - 目标输出shape为 `H x W` ,输出shape可以是一个元组,或者 `H x H` 的单个H。
|
||||
指明了输出tensor的大小 `(H, W)` 。
|
||||
|
||||
- **data_format** (str,可选) - 可选的数据格式值,当前支持 `NCHW` ,默认为 `NCHW` 。
|
||||
|
||||
输入:
|
||||
- **input_x** (Tensor) - Tensor的shape :math:`(N, C, H_{in}, W_{in})` ,数据类型为:float16、float32、float64、int32、int64。
|
||||
|
||||
- **random_samples** (Tensor) - Tensor的shape为 :math:`(N, C, 2)` ,数据类型为:float16、float32、float64。
|
||||
|
||||
输出:
|
||||
- **y** (Tensor) - 一个Tensor,与 `input_x` 具有相同的dtype,shape为 :math:`(N, C, output\underline{~}shape{H}, output\underline{~}shape{W})`。
|
||||
|
||||
- **argmax** (Tensor) - 一个Tensor,数据类型必须为int64,与 `y` 具有相同的shape。
|
||||
|
||||
异常:
|
||||
|
|
|
@ -17,8 +17,8 @@ mindspore.ops.ListDiff
|
|||
- **y** (Tensor) - 一个1-D Tensor,与 `x` 类型一致。移除的值。
|
||||
|
||||
输出:
|
||||
**out** (Tensor) - 一个1-D Tensor,与 `x` 类型一致。
|
||||
**idx** (Tensor) - 一个1-D Tensor, `out_idx` 类型。
|
||||
- **out** (Tensor) - 一个1-D Tensor,与 `x` 类型一致。
|
||||
- **idx** (Tensor) - 一个1-D Tensor, `out_idx` 类型。
|
||||
|
||||
异常:
|
||||
- **ValueError** - 如果 `x` 或 `y` 的shape不是1D。
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mindspore.ops.LogNormalReverse
|
||||
==============================
|
||||
|
||||
.. py:class:: mindspore.ops.LogNormalReverse(mean=2.0, std=1.0)
|
||||
.. py:class:: mindspore.ops.LogNormalReverse(mean=1.0, std=2.0)
|
||||
|
||||
用给定均值和标准差初始化对数正态分布,并以此填充输入Tensor的元素。
|
||||
|
||||
|
|
|
@ -14,6 +14,6 @@ mindspore.ops.MatrixLogarithm
|
|||
|
||||
异常:
|
||||
- **TypeError** - 如果 `x` 不是Tensor。
|
||||
- **ValueError** - 如果 `x` 的数据类型不是complex64或complex128。
|
||||
- **TypeError** - 如果 `x` 的数据类型不是complex64或complex128。
|
||||
- **ValueError** - 如果 `x` 的维度小于2。
|
||||
- **ValueError** - 如果内部的两维不相等。
|
||||
|
|
|
@ -31,7 +31,7 @@ mindspore.ops.MaxUnpool2D
|
|||
- 如果 `pads` 是一个整数,则高度和宽度方向的填充数量相同,都等于 `pads` 。
|
||||
- 如果 `pads` 是含两个整数的元组,高度和宽度方向的填充数量分别等于 `pads[0]` 和 `pads[1]` 。
|
||||
|
||||
- **output_shape** (tuple[int],可选) 一个可选的输入,指定目标输出的尺寸。默认值:()。
|
||||
- **output_shape** (tuple[int],可选) - 一个可选的输入,指定目标输出的尺寸。默认值:()。
|
||||
|
||||
- 如果 `output_shape == ()` ,则输出的shape由 `kszie` 、 `strides` 和 `pads` 计算得到。
|
||||
- 如果 :math:`output_shape != ()` ,则 `output_shape` 必须为 :math:`(N, C, H, W)` 或 :math:`(N, H, W, C)` ,
|
||||
|
|
|
@ -7,9 +7,6 @@ mindspore.ops.ResizeBilinearV2
|
|||
|
||||
调整过程只改变输入图像最低量维度的数据,分别代表高和宽。
|
||||
|
||||
.. warning::
|
||||
在CPU后端,不支持将 `half_pixel_centers` 设为True。
|
||||
|
||||
参数:
|
||||
- **align_corners** (bool,可选) - 如果为True,则使用比例 :math:`(new\_height - 1) / (height - 1)` 对输入进行缩放,此时输入图像和输出图像的四个角严格对齐。如果为False,使用比例 :math:`new\_height / height` 输入进行缩放。默认值:False。
|
||||
- **half_pixel_centers** (bool,可选) - 是否使用半像素中心对齐。如果设置为True,那么 `align_corners` 应该设置为False。默认值:False。
|
||||
|
|
|
@ -14,7 +14,7 @@ mindspore.ops.ResizeNearestNeighborV2
|
|||
|
||||
输入:
|
||||
- **x** (Tensor) - 四维的Tensor,其shape为 :math:`(batch, height, width, channels)` 或者 :math:`(batch, channels, height, width)`,取决于 `data_format` 。支持的数据类型列表:[int8, uint8, int16, uint16, int32, int64, float16, float32, float64]。
|
||||
- **size** (Tensor) - 输出图片的尺寸。一维的Tensor,含有两个元素[ `new_height`,`new_width` ]。
|
||||
- **size** (Tensor) - 输出图片的尺寸。一维的Tensor,含有两个元素 `[new_height, new_width]`。
|
||||
|
||||
输出:
|
||||
- **y** (Tensor) - 调整大小后的图像。是一个shape为 :math:`(batch, new\_height, new\_width, channels)` 或者 :math:`(batch, channels, new\_height, new\_width)` 的四维Tensor,具体是哪一个shape取决于 `data_format` 。数据类型与输入 `x` 相同。
|
||||
|
|
|
@ -13,8 +13,8 @@ mindspore.ops.TrilIndices
|
|||
参数:
|
||||
- **row** (int) - 2-D 矩阵的行数。
|
||||
- **col** (int) - 2-D 矩阵的列数。
|
||||
- **offset** (int,可选) - 对角线偏移量。默认值:0。
|
||||
- **dtype** (:class:`mindspore.dtype` ,可选) - 指定输出Tensor数据类型,支持的数据类型为 `mstype.int32` 和 `mstype.int64` ,默认值: `mstype.int32` 。
|
||||
- **offset** (int, 可选) - 对角线偏移量。默认值:0。
|
||||
- **dtype** (:class:`mindspore.dtype`, 可选) - 指定输出Tensor数据类型,支持的数据类型为 `mstype.int32` 和 `mstype.int64` ,默认值: `mstype.int32` 。
|
||||
|
||||
输出:
|
||||
- **y** (Tensor) - 矩阵的下三角形部分的索引。数据类型由 `dtype` 指定,shape为 :math:`(2, tril_size)` ,其中, `tril_size` 为下三角矩阵的元素总数。
|
||||
|
|
|
@ -7,7 +7,7 @@ mindspore.ops.angle
|
|||
输入中的元素被认为是形式为a+bj的复数,其中a是实部,b是虚部。此函数返回的参数的形式为atan2(b,a)。
|
||||
|
||||
参数:
|
||||
- **x** (Tensor) -输入Tensor。支持类型:complex64、complex128。
|
||||
- **x** (Tensor) - 输入Tensor。支持类型:complex64、complex128。
|
||||
|
||||
返回:
|
||||
Tensor,类型为float32或float64,shape与输入相同。
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
|
||||
异常:
|
||||
- **TypeError** - 如果 `input` 的数据类型不是数字类型。
|
||||
- **ValueError** - 如果 `input` 不是Tensor。
|
||||
- **TypeError** - 如果 `input` 不是Tensor。
|
||||
|
|
|
@ -6232,8 +6232,8 @@ def log10(x):
|
|||
|
||||
Raises:
|
||||
TypeError: If `x` is not a Tensor.
|
||||
TypeError: If dtype of `x` is not float16 or float32 or float64 on CPU and GPU, if dtype of `x` is not float16
|
||||
or float32 on Ascend.
|
||||
TypeError: If dtype of `x` is not float16 or float32 or float64 on CPU and GPU.
|
||||
TypeError: If dtype of `x` is not float16 or float32 on Ascend.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``GPU`` ``CPU``
|
||||
|
|
|
@ -3777,7 +3777,7 @@ class ResizeNearestNeighborV2(Primitive):
|
|||
tensors are aligned, preserving the values at the corner pixels. Defaults: False.
|
||||
half_pixel_centers (bool, optional): Whether half pixel center. If set to True,
|
||||
`align_corners` should be False. Default: False.
|
||||
data_format (string, optional): An optional `string` that describes the
|
||||
data_format (str, optional): An optional `string` that describes the
|
||||
format of the input `x`. Default: `NHWC`.
|
||||
|
||||
Inputs:
|
||||
|
@ -5417,6 +5417,7 @@ class BroadcastTo(Primitive):
|
|||
>>> print(output)
|
||||
[[1. 2. 3.]
|
||||
[1. 2. 3.]]
|
||||
>>>
|
||||
>>> shape = (-1, 2)
|
||||
>>> x = Tensor(np.array([[1], [2]]).astype(np.float32))
|
||||
>>> output = ops.BroadcastTo(shape=shape)(x)
|
||||
|
|
|
@ -6538,7 +6538,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 details.
|
||||
Refer to :func:`mindspore.ops.cholesky_inverse` for more details.
|
||||
|
||||
Supported Platforms:
|
||||
``GPU`` ``CPU``
|
||||
|
@ -6938,7 +6938,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 details.
|
||||
Refer to :func:`mindspore.ops.cholesky` for more details.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
@ -7550,6 +7550,7 @@ class Eig(Primitive):
|
|||
Args:
|
||||
compute_v (bool): If `True`, compute both eigenvalues and eigenvectors;
|
||||
If `False`, just eigenvalues will be computed. Default: False.
|
||||
|
||||
Inputs:
|
||||
- **x** (Tensor) - Square matrices of shape :math:`(*, N, N)`,
|
||||
with float32, float64, complex64 or complex128 data type.
|
||||
|
|
|
@ -10215,7 +10215,7 @@ class FractionalMaxPoolWithFixedKsize(Primitive):
|
|||
Fractional max pooling operation.
|
||||
|
||||
Applies a 2D fractional max pooling to an input signal composed of multiple input planes.
|
||||
The max-pooling operation is applied in kH × kW regions by a stochastic step size determined by
|
||||
The max-pooling operation is applied in kH x kW regions by a stochastic step size determined by
|
||||
the target output size. For any input size, the size of the specified output is H x W. The number
|
||||
of output features is equal to the number of input planes.
|
||||
|
||||
|
|
Loading…
Reference in New Issue