modify format

This commit is contained in:
huodagu 2023-02-23 16:54:19 +08:00
parent b43b194681
commit 9776df6cf7
14 changed files with 19 additions and 19 deletions

View File

@ -44,7 +44,7 @@ mindspore.Profiler
异常:
- **TypeError** - op_name参数类型不正确。
- **TypeError** - device_id参数类型不正确。
- **RunTimeError** - 在Ascend上使用该接口获取性能数据。
- **RuntimeError** - 在Ascend上使用该接口获取性能数据。
.. py:method:: start()

View File

@ -3,7 +3,7 @@ mindspore.ops.UniformReal
.. py:class:: mindspore.ops.UniformReal(seed=0, seed2=0)
产生随机的浮点数,均匀分布在[01)范围内。
产生随机的浮点数,均匀分布在[0, 1)范围内。
参数:
- **seed** (int) - 算子层的随机种子用于生成随机数。必须是非负的。默认值0。

View File

@ -10,7 +10,7 @@ mindspore.ops.coo_log
.. warning::
如果算子Log的输入值在(00.01]或[0.951.05]范围内,则输出精度可能会存在误差。
如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。
参数:
- **x** (COOTensor) - 任意维度的输入COOTensor。该值必须大于0。

View File

@ -6,7 +6,7 @@ mindspore.ops.count_nonzero
计算输入Tensor指定轴上的非零元素的数量。如果没有指定维度则计算Tensor中所有非零元素的数量。
.. note::
`dims` 的值范围是[-x_dimsx_dims)。其中, `x_dims` 是输入 `x` 的维度。
`dims` 的值范围是[-x_dims, x_dims)。其中, `x_dims` 是输入 `x` 的维度。
参数:
- **x** (Tensor) - 要计算的输入可以是任意维度的Tensor。将输入张量的shape设为 :math:`(x_1, x_2, ..., x_N)`
@ -18,4 +18,4 @@ mindspore.ops.count_nonzero
异常:
- **TypeError** - 如果 `x` 的数据类型不受支持。
- **TypeError** - 如果 `dims` 的数据类型不是int。
- **ValueError** - 如果 `dims` 中的任何值不在 :math:`[-x_dimsx_dims)` 范围内。
- **ValueError** - 如果 `dims` 中的任何值不在 :math:`[-x_dims, x_dims)` 范围内。

View File

@ -10,7 +10,7 @@ mindspore.ops.csr_log
.. warning::
如果算子Log的输入值在(00.01]或[0.951.05]范围内,则输出精度可能会存在误差。
如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。
参数:
- **x** (CSRTensor) - 任意维度的输入CSRTensor。该值必须大于0。

View File

@ -10,7 +10,7 @@ mindspore.ops.log
.. warning::
如果算子Log的输入值在(00.01]或[0.951.05]范围内,则输出精度可能会存在误差。
如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。
.. note::
Ascend上输入Tensor的维度要小于等于8CPU上输入Tensor的维度要小于8。

View File

@ -12,7 +12,7 @@ mindspore.ops.transpose
参数:
- **input_x** (Tensor) - 输入Tensor其shape是 :math:`(x_1, x_2, ..., x_R)`
- **input_perm** (tuple[int]) - 指定排列。 `input_perm` 中的元素由 `input_x` 的每个维度的索引组成。 `input_perm` 的长度和 `input_x` 的shape相同。只支持常量值。其范围在[-rank(input_x)rank(input_x))内。
- **input_perm** (tuple[int]) - 指定排列。 `input_perm` 中的元素由 `input_x` 的每个维度的索引组成。 `input_perm` 的长度和 `input_x` 的shape相同。只支持常量值。其范围在[-rank(input_x), rank(input_x))内。
返回:
Tensor输出Tensor的数据类型与 `input_x` 相同输出Tensor的shape由 `input_x` 的shape和 `input_perm` 的值决定。

View File

@ -444,7 +444,7 @@ class TransformerEncoder(Cell):
Inputs:
- **src** (Tensor): the sequence to the encoder (required).
- **mask** (Tensor): the mask for the src sequence (optional).
- **src_mask** (Tensor): the mask for the src sequence (optional).
- **src_key_padding_mask** (Tensor): the mask for the src keys per batch (optional).
Outputs:

View File

@ -3629,7 +3629,7 @@ class SparseSliceGrad(Primitive):
ValueError: If the number of `backprop_val_grad` is not corresponding to the number of `new_indices`.
ValueError: If the shape of `indices[1]` is not corresponding to `start[1]`.
ValueError: If the shape of `indices[1]` is not corresponding to `new_indices[1]`.
RunTimeError: If the `backprop_val_grad` is not all backpropagated, because `indices` or `new_indices`
RuntimeError: If the `backprop_val_grad` is not all backpropagated, because `indices` or `new_indices`
is not sorted.
Supported Platforms:

View File

@ -2407,8 +2407,8 @@ class SparseCountSparseOutput(Primitive):
ValueError: If number of values does not match first dimension of indices
ValueError: If number of dense_shape dimensions does not match second dimension of indices
ValueError: If num dim of dense_shape is < 1
RunTimeError: If number of weights is not equal to number of values
RunTimeError: If indexes are not in bounds of the dense shape
RuntimeError: If number of weights is not equal to number of values
RuntimeError: If indexes are not in bounds of the dense shape
Examples:
>>> from mindspore.ops.operations.sparse_ops import SparseCountSparseOutput

View File

@ -277,7 +277,7 @@ class Profiler:
Raises:
TypeError: If the op_name parameter type is incorrect.
TypeError: If the device_id parameter type is incorrect.
RunTimeError: If MindSpore runs on Ascend, this interface cannot be used.
RuntimeError: If MindSpore runs on Ascend, this interface cannot be used.
Supported Platforms:
``GPU`` ``CPU``