!46021 modify the format of files 1125
Merge pull request !46021 from 宦晓玲/code_docs_1125
This commit is contained in:
commit
ef247fb7cc
|
@ -52,7 +52,7 @@
|
|||
- **TypeError** - 如果参数 `stride` 或者 `dilation` 不是一个整数或者包含两个整数的元组或者包含四个整数的元组。
|
||||
- **ValueError** - 如果参数 `stride` 或者 `dilation` 是一个元组,并且它的长度不是2或者4。
|
||||
- **ValueError** - 如果参数 `stride` 或者 `dilation` 是一个包含四个整数的元组,它的shape不是 `(1, 1, height, width)`。
|
||||
- **ValueError** - 如果参数 `stride` 的取值范围不是`[1, 255]`。
|
||||
- **ValueError** - 如果参数 `stride` 的取值范围不是 `[1, 255]` 。
|
||||
- **ValueError** - 如果参数 `dilation` 的值小于1。
|
||||
- **ValueError** - 如果参数 `pad_mode` 不是 `same` 、 `valid` 、 `SAME` 或者 `VALID`。
|
||||
- **ValueError** - 如果参数 `data_format` 不是字符串`NCHW`。
|
||||
|
|
|
@ -28,5 +28,6 @@ mindspore.ops.PadV3
|
|||
- **ValueError** - `mode` 是"edge"或"reflect", `x` 的维度是4, `paddings` 元素个数是4。
|
||||
- **ValueError** - `mode` 是"edge"或"reflect"的同时 `x` 的维度小于3。
|
||||
- **ValueError** - `mode` 是"edge"的同时 `x` 的维度大于5。
|
||||
- **ValueError** - `mode` 是"reflect"的同时 `x` 的维度大于4。
|
||||
- **ValueError** - `mode` 是"reflect"的同时填充值大于对应 `x` 的维度。
|
||||
- **ValueError** - 填充之后,输出shape数不大于零。
|
||||
|
|
|
@ -13,5 +13,5 @@ mindspore.ops.angle
|
|||
Tensor,类型为float32或float64,shape与输入相同。
|
||||
|
||||
异常:
|
||||
TypeError:如果 `x` 不是Tensor。
|
||||
TypeError:如果输入的数据类型不是complex64或complex128。
|
||||
- **TypeError** - 如果 `x` 不是Tensor。
|
||||
- **TypeError** - 如果输入的数据类型不是complex64或complex128。
|
||||
|
|
|
@ -3,7 +3,7 @@ mindspore.ops.nan_to_num
|
|||
|
||||
.. py:function:: mindspore.ops.nan_to_num(x, nan=0.0, posinf=None, neginf=None)
|
||||
|
||||
将 `x` 中的`NaN`、正无穷大和负无穷大值分别替换为 `nan`, `posinf`, 和 `neginf` 指定的值。默认情况下,NaN替换为0,正无穷替换为 `x` 类型支持的上限,负无穷替换为由 `x` 类型支持的下限。
|
||||
将 `x` 中的 `NaN` 、正无穷大和负无穷大值分别替换为 `nan`, `posinf`, 和 `neginf` 指定的值。默认情况下,NaN替换为0,正无穷替换为 `x` 类型支持的上限,负无穷替换为由 `x` 类型支持的下限。
|
||||
|
||||
参数:
|
||||
- **x** (Tensor) - shape为 :math:`(x_1, x_2, ..., x_R)` 的tensor。类型必须为float32或float16。
|
||||
|
|
|
@ -37,7 +37,7 @@ def print_(*input_x):
|
|||
`Summary <https://www.mindspore.cn/mindinsight/docs/en/master/summary_record.html?highlight=summary#>`_.
|
||||
|
||||
Args:
|
||||
input_x (Union[Tensor, bool, int, float, str]): The inputs of print_.
|
||||
input_x (Union[Tensor, bool, int, float, str, tuple, list]): The inputs of print_.
|
||||
Supports multiple inputs which are separated by ','.
|
||||
|
||||
Returns:
|
||||
|
|
|
@ -441,9 +441,6 @@ class Im2Col(Primitive):
|
|||
Outputs:
|
||||
Tensor, a 4-D Tensor with same type of input `x`.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
||||
Raises:
|
||||
TypeError: If `ksizes` data type is not in Union[int, tuple[int], list[int]].
|
||||
TypeError: If `strides` data type is not in Union[int, tuple[int], list[int]].
|
||||
|
@ -457,6 +454,9 @@ class Im2Col(Primitive):
|
|||
ValueError: If `padding_mode` value is not in ["SAME", "VALID", "CALCULATED"].
|
||||
ValueError: If `pads` value is not greater than zero.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``CPU``
|
||||
|
||||
Examples:
|
||||
>>> x = Tensor(input_data=np.random.rand(4, 4, 32, 32), dtype=mstype.float64)
|
||||
>>> im2col = P.Im2Col(ksizes=3, strides=1, dilations=1)
|
||||
|
@ -555,9 +555,6 @@ class Col2Im(Primitive):
|
|||
Outputs:
|
||||
Tensor, a 4-D Tensor with same type of input `x`.
|
||||
|
||||
Supported Platforms:
|
||||
``CPU``
|
||||
|
||||
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]].
|
||||
|
@ -570,6 +567,9 @@ class Col2Im(Primitive):
|
|||
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.
|
||||
|
||||
Supported Platforms:
|
||||
``CPU``
|
||||
|
||||
Examples:
|
||||
>>> import numpy as np
|
||||
>>> from mindspore import Tensor
|
||||
|
@ -7451,7 +7451,7 @@ class FillDiagonal(Primitive):
|
|||
|
||||
Args:
|
||||
fill_value (float): The fill value.
|
||||
wrap (bool): the diagonal ‘wrapped’ after N columns for tall matrices. Default: False.
|
||||
wrap (bool, optional): the diagonal ‘wrapped’ after N columns for tall matrices. Default: False.
|
||||
|
||||
Inputs:
|
||||
- **input_x** (Tensor) - The shape of tensor is :math:`(x_1, x_2, ..., x_R)`.
|
||||
|
|
|
@ -184,15 +184,15 @@ class ExtractGlimpse(Primitive):
|
|||
If the window and input image tensor not overlap, random noise is filled.
|
||||
|
||||
Args:
|
||||
centered (bool): An optional `bool`. Indicates if the offset coordinates
|
||||
centered (bool, optional): An optional `bool`. Indicates if the offset coordinates
|
||||
are centered relative to the image, in which case the (0, 0) offset is relative to the center of
|
||||
the center of the input images. If false, the (0, 0) offset corresponds to the upper left corner
|
||||
of the input images. Defaults to `True`.
|
||||
normalized (bool): An optional `bool`. indicates if the offset
|
||||
normalized (bool, optional): An optional `bool`. indicates if the offset
|
||||
coordinates are normalized. Defaults to `True`.
|
||||
uniform_noise (bool): An optional `bool`. indicates if the noise should be
|
||||
uniform_noise (bool, optional): An optional `bool`. indicates if the noise should be
|
||||
generated using a uniform distribution or a Gaussian distribution. Defaults to `True`.
|
||||
noise (str): An optional string. The value can be 'uniform', 'gaussian'
|
||||
noise (str, optional): An optional string. The value can be 'uniform', 'gaussian'
|
||||
and 'zero'. The window is determined by size and offsets.
|
||||
When the window and input image tensor not overlap, random noise is filled.
|
||||
The result is variable when noise is equal to 'uniform' and 'gaussian'.
|
||||
|
@ -352,7 +352,7 @@ class CropAndResize(Primitive):
|
|||
|
||||
class NonMaxSuppressionV3(Primitive):
|
||||
r"""
|
||||
Greedily selects a subset of bounding boxes in descending order of score.
|
||||
Greedily selects a subset of bounding boxes in descending order of score.
|
||||
|
||||
.. warning::
|
||||
When input `max_output_size` is negative, it will be treated as 0.
|
||||
|
@ -384,7 +384,7 @@ class NonMaxSuppressionV3(Primitive):
|
|||
TypeError: If the dtype of `boxes` and `scores` are different.
|
||||
TypeError: If the dtype of `iou_threshold` and `score_threshold` are different.
|
||||
TypeError: If `boxes` is not tensor or its dtype is not float16 or float32.
|
||||
TypeEroor: If `scores` is not tensor or its dtype is not float16 or float32.
|
||||
TypeError: If `scores` is not tensor or its dtype is not float16 or float32.
|
||||
TypeError: If `max_output_size` is not tensor or scalar or its date type is not int32 or int64.
|
||||
TypeError: If `iou_threshold` is not tensor or scalar or its type is neither float16 or float32.
|
||||
TypeError: If `score_threshold` is not tensor or scalar or its type is neither float16 or float32.
|
||||
|
|
|
@ -542,7 +542,7 @@ class EuclideanNorm(Primitive):
|
|||
Reduces input along the dimensions given in axis.
|
||||
|
||||
Args:
|
||||
keep_dims (bool): If true, the reduceed dimensions are retained with length 1.
|
||||
keep_dims (bool, optional): If true, the reduceed dimensions are retained with length 1.
|
||||
If false, don't keep these dimensions. Default: False.
|
||||
|
||||
Inputs:
|
||||
|
|
|
@ -9134,7 +9134,7 @@ class FractionalMaxPool3DWithFixedKsize(Primitive):
|
|||
output_shape can be a tuple, or a single H for H x H x H.
|
||||
specifying the size (D, H, W) of the output tensor.
|
||||
|
||||
data_format (str) : The optional value for data format.
|
||||
data_format (str, optional) : The optional value for data format.
|
||||
Currently support 'NCDHW' and 'NHDWC'. Default: 'NCDHW'.
|
||||
|
||||
Inputs:
|
||||
|
@ -10198,7 +10198,7 @@ class FractionalMaxPoolWithFixedKsize(Primitive):
|
|||
output_shape (Union[int, tuple[int]]): The target output size is H x W.
|
||||
output_shape can be a tuple, or a single H for H x H.
|
||||
specifying the size (H, W) of the output tensor.
|
||||
data_format (str): The optional value for data format, is 'NCHW'.
|
||||
data_format (str, optional): The optional value for data format, is 'NCHW'.
|
||||
Default: "NCHW".
|
||||
|
||||
Inputs:
|
||||
|
|
|
@ -86,7 +86,7 @@ class TruncatedNormal(Primitive):
|
|||
seed (int, optional): An optional int. Defaults to 0. If either `seed` or `seed2` are set to be non-zero,
|
||||
the seed is set by the given seed. Otherwise, it is seeded by a random seed.
|
||||
seed2 (int, optional): An optional int. Defaults to 0. A second seed to avoid seed collision.
|
||||
dtype (mindspore.dtype): Specified output data type. Must be one of the following types:
|
||||
dtype (mindspore.dtype, optional): Specified output data type. Must be one of the following types:
|
||||
mindspore.float16, mindspore.float32 and mindspore.float64. Default: mindspore.float32.
|
||||
|
||||
Inputs:
|
||||
|
|
Loading…
Reference in New Issue