modify format1128

This commit is contained in:
huodagu 2022-11-28 12:00:46 +08:00
parent 5a96e68502
commit c6ca767e23
16 changed files with 19 additions and 19 deletions

View File

@ -1,6 +1,6 @@
mindspore.Tensor.clamp
=======================
.. py:method:: mindspore.Tensor.clamp(min, max)
.. py:method:: mindspore.Tensor.clamp(min=None, max=None)
详情请参考 :func:`mindspore.ops.clamp`

View File

@ -1,6 +1,6 @@
mindspore.Tensor.clip
=====================
.. py:method:: mindspore.Tensor.clip(min, max)
.. py:method:: mindspore.Tensor.clip(min=None, max=None)
:func:`mindspore.Tensor.clamp` 的别名。

View File

@ -3,4 +3,4 @@ mindspore.Tensor.unfold
.. py:method:: mindspore.Tensor.unfold(kernel_size, dilation=1, padding=0, stride=1)
详情请参考 :func:`mindspore.ops.unfold`
详情请参考 :func:`mindspore.ops.unfold`

View File

@ -28,5 +28,6 @@
- **values** (Tensor) - 输入Tensor的最小值其shape与索引相同。
异常:
- **TypeError** - `x` 不是Tensor。
- **TypeError** - `keep_dims` 不是bool。
- **TypeError** - `axis` 不是int。

View File

@ -16,7 +16,7 @@
- **noise** (str可选) - 可选string其值可以为 `uniform``gaussian``zero`
窗口由输入大小和偏移决定,如果窗口与输入部分没有重叠,则填充随机噪声。当 `noise``uniform` 或者 `gaussian`
其填充结果是变量。当 `noise``zero` ,则 `uniform_noise` 必须为False这样填充的噪声才是0保证了结果的正确。
`uniform_noise` 为True `noise` 仅可以为 `uniform` 。当 `uniform_noise` 为False `noise`可以为 `uniform``gaussian``zero`
`uniform_noise` 为True `noise` 仅可以为 `uniform` 。当 `uniform_noise` 为False `noise` 可以为 `uniform``gaussian``zero`
默认为 `uniform`
输入:

View File

@ -11,9 +11,9 @@ mindspore.ops.Histogram
低于最小值和高于最大值的元素将被忽略。
参数:
- **bins** (int 可选) - 直方图箱的数量可选。默认值100。若指定则必须为正数。
- **min** (float可选) - 范围下端的可选浮点数。默认值0.0。
- **max** (float可选) - 范围上限的可选浮点数。默认值0.0。
- **bins** (int, 可选) - 直方图箱的数量可选。默认值100。若指定则必须为正数。
- **min** (float, 可选) - 范围下端的可选浮点数。默认值0.0。
- **max** (float, 可选) - 范围上限的可选浮点数。默认值0.0。
输入:
- **x** (Tensor) - 输入Tensor类型支持 :math:`[float16, float32, int32]`

View File

@ -10,7 +10,7 @@ mindspore.ops.ListDiff
表示每个 `out` 元素在 `x` 中的位置。即: :math:`out[i] = x[idx[i]] for i in [0, 1, ..., len(out) - 1]`
参数:
- **out_idx** (:class:`mindspore.dtype` ,可选) - `idx` 的数据类型,可选值: `mindspore.dtype.int32``mindspore.dtype.int64` 。默认值: `mindspore.dtype.int32`
- **out_idx** (:class:`mindspore.dtype`,可选) - `idx` 的数据类型,可选值: `mindspore.dtype.int32``mindspore.dtype.int64` 。默认值: `mindspore.dtype.int32`
输入:
- **x** (Tensor) - 一个1-D Tensor。保留的值。类型支持[float16, float32, float64, uint8, uint16, int8, int16, int32, int64]。

View File

@ -21,7 +21,7 @@ mindspore.ops.NonDeterministicInts
异常:
- **TypeError** - `shape` 不是Tensor。
- **ValueError** - `dtype` 不是mindspore.int32或mindspore.int64。
- **TypeError** - `dtype` 不是mindspore.int32或mindspore.int64。
- **ValueError** - `shape` 中含有负数。
- **ValueError** - `shape` 元素个数少于2。
- **ValueError** - `shape` 不是一维Tensor。

View File

@ -23,5 +23,5 @@ mindspore.ops.RandomPoisson
异常:
- **TypeError** - `shape` 不是Tensor或数据类型不是int32或int64。
- **TypeError** - `dtype` 数据类型不是int32或int64。
- **TypeError** - `shape` 不是一维Tensor。
- **ValueError** - `shape` 不是一维Tensor。
- **ValueError** - `shape` 的元素存在负数。

View File

@ -29,8 +29,7 @@ mindspore.ops.ScaleAndTranslate
- **TypeError** - `size` 不是int32类型。
- **TypeError** - `scale` 不是float32类型。
- **TypeError** - `translation` 不是Tensor或者数据类型不是float32。
- **ValueError** - `kernel_type` 不在列表里面:["lanczos1", "lanczos3", "lanczos5", "gaussian", "box", "triangle",
"keyscubic", "mitchellcubic"]。
- **ValueError** - `kernel_type` 不在列表里面:["lanczos1", "lanczos3", "lanczos5", "gaussian", "box", "triangle", "keyscubic", "mitchellcubic"]。
- **ValueError** - `images` 的秩不等于4。
- **ValueError** - `size` 的shape不是 :math:`(2,)`
- **ValueError** - `scale` 的shape不是 :math:`(2,)`

View File

@ -14,7 +14,7 @@ mindspore.ops.TrilIndices
- **row** (int) - 2-D 矩阵的行数。
- **col** (int) - 2-D 矩阵的列数。
- **offset** (int可选) - 对角线偏移量。默认值0。
- **dtype** (:class:`mindspore.dtype` ,可选) - 指定输出Tensor数据类型支持的数据类型为 `mindspore.int32``mindspore.int64` ,默认值: `mindspore.int32`
- **dtype** (:class:`mindspore.dtype`,可选) - 指定输出Tensor数据类型支持的数据类型为 `mindspore.int32``mindspore.int64` ,默认值: `mindspore.int32`
输出:
- **y** (Tensor) - 矩阵的下三角形部分的索引。数据类型由 `dtype` 指定shape为 :math:`(2, tril_size)` ,其中, `tril_size` 为下三角矩阵的元素总数。

View File

@ -24,7 +24,7 @@ mindspore.ops.TruncatedNormal
异常:
- **TypeError** - `shape` 不是Tensor。
- **TypeError** - `dtype``shape` 的数据类型不支持。
- **ValueError** - `seed` 不是整数。
- **TypeError** - `seed` 不是整数。
- **ValueError** - `shape` 的元素不全大于零。
- **ValueError** - `shape` 不是一维Tensor。
- **ValueError** - 输出Tensor的元素个数大于1000000。

View File

@ -272,11 +272,11 @@ def where(condition, x, y):
r"""
Returns a tensor whose elements are selected from either `x` or `y` depending on `condition`.
..math::
.. math::
output_i = \begin{cases} x_i,\quad &if\ condition_i \\ y_i,\quad &otherwise \end{cases}
Args:
condition (Bool Tensor, bool, scalar): If True, yield `x` otherwise yield `y`.
condition (Union[Bool Tensor, bool, scalar]): If True, yield `x` otherwise yield `y`.
x (Union[Tensor, Scalar]): Value (if `x` is a scalar) or values selected at indices where condition is True.
y (Union[Tensor, Scalar]): Value (if `y` is a scalar) or values selected at indices where condition is False.

View File

@ -390,7 +390,7 @@ def angle(x):
is the imaginary part. The argument returned by this function is of the form atan2(b,a).
Args:
x (Tensor) - The input tensor. types: complex64, complex128.
x (Tensor): The input tensor. types: complex64, complex128.
Returns:
Tensor, has the float32 or float64 type and the same shape as input.

View File

@ -78,7 +78,7 @@ def coo_cos(x: COOTensor) -> COOTensor:
Raises:
TypeError: If `x` is not a COOTensor.
TypeError: If dtype of `x` is not float16, float32 or float64, complex64,
complex128.
complex128.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``

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: None.
Inputs:
- **condition** (Union[Tensor[bool], bool]) - The condition to be identified.