diff --git a/docs/api/api_python/mindspore/mindspore.Profiler.rst b/docs/api/api_python/mindspore/mindspore.Profiler.rst index cece5fa05fb..9e8c559a948 100644 --- a/docs/api/api_python/mindspore/mindspore.Profiler.rst +++ b/docs/api/api_python/mindspore/mindspore.Profiler.rst @@ -44,7 +44,7 @@ mindspore.Profiler 异常: - **TypeError** - op_name参数类型不正确。 - **TypeError** - device_id参数类型不正确。 - - **RunTimeError** - 在Ascend上使用该接口获取性能数据。 + - **RuntimeError** - 在Ascend上使用该接口获取性能数据。 .. py:method:: start() diff --git a/docs/api/api_python/ops/mindspore.ops.UniformReal.rst b/docs/api/api_python/ops/mindspore.ops.UniformReal.rst index 836af02cf6f..9269aa7bca0 100644 --- a/docs/api/api_python/ops/mindspore.ops.UniformReal.rst +++ b/docs/api/api_python/ops/mindspore.ops.UniformReal.rst @@ -3,7 +3,7 @@ mindspore.ops.UniformReal .. py:class:: mindspore.ops.UniformReal(seed=0, seed2=0) - 产生随机的浮点数,均匀分布在[0,1)范围内。 + 产生随机的浮点数,均匀分布在[0, 1)范围内。 参数: - **seed** (int) - 算子层的随机种子,用于生成随机数。必须是非负的。默认值:0。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_atan2.rst b/docs/api/api_python/ops/mindspore.ops.func_atan2.rst index 2d18ad162db..055ab3bf3ce 100644 --- a/docs/api/api_python/ops/mindspore.ops.func_atan2.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_atan2.rst @@ -16,8 +16,8 @@ mindspore.ops.atan2 - **input** (Tensor, Number.number) - 输入Tensor或常数,shape: :math:`(N,*)` ,其中 :math:`*` 表示任何数量的附加维度。 - **other** (Tensor, Number.number) - 输入Tensor或常数,shape应能在广播后与 `input` 相同,或 `input` 的shape在广播后与 `other` 相同。 - .. note:: - 两个参数中,至少有一个需要为Tensor。 + .. note:: + 两个参数中,至少有一个需要为Tensor。 返回: Tensor或常数,与广播后的输入shape相同,和 `input` 数据类型相同。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_coo_log.rst b/docs/api/api_python/ops/mindspore.ops.func_coo_log.rst index f2110cb715b..c5dfce3aca3 100755 --- a/docs/api/api_python/ops/mindspore.ops.func_coo_log.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_coo_log.rst @@ -10,7 +10,7 @@ mindspore.ops.coo_log .. warning:: - 如果算子Log的输入值在(0,0.01]或[0.95,1.05]范围内,则输出精度可能会存在误差。 + 如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。 参数: - **x** (COOTensor) - 任意维度的输入COOTensor。该值必须大于0。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_count_nonzero.rst b/docs/api/api_python/ops/mindspore.ops.func_count_nonzero.rst index f99974df7b4..9a3a8a64dab 100644 --- a/docs/api/api_python/ops/mindspore.ops.func_count_nonzero.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_count_nonzero.rst @@ -6,7 +6,7 @@ mindspore.ops.count_nonzero 计算输入Tensor指定轴上的非零元素的数量。如果没有指定维度,则计算Tensor中所有非零元素的数量。 .. note:: - `dims` 的值范围是[-x_dims,x_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_dims,x_dims)` 范围内。 + - **ValueError** - 如果 `dims` 中的任何值不在 :math:`[-x_dims, x_dims)` 范围内。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_csr_log.rst b/docs/api/api_python/ops/mindspore.ops.func_csr_log.rst index 11b566d7ada..d4249c2b71f 100755 --- a/docs/api/api_python/ops/mindspore.ops.func_csr_log.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_csr_log.rst @@ -10,7 +10,7 @@ mindspore.ops.csr_log .. warning:: - 如果算子Log的输入值在(0,0.01]或[0.95,1.05]范围内,则输出精度可能会存在误差。 + 如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。 参数: - **x** (CSRTensor) - 任意维度的输入CSRTensor。该值必须大于0。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_log.rst b/docs/api/api_python/ops/mindspore.ops.func_log.rst index 3fb44de1808..57037b6d177 100644 --- a/docs/api/api_python/ops/mindspore.ops.func_log.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_log.rst @@ -10,7 +10,7 @@ mindspore.ops.log .. warning:: - 如果算子Log的输入值在(0,0.01]或[0.95,1.05]范围内,则输出精度可能会存在误差。 + 如果算子Log的输入值在(0, 0.01]或[0.95, 1.05]范围内,则输出精度可能会存在误差。 .. note:: Ascend上输入Tensor的维度要小于等于8,CPU上输入Tensor的维度要小于8。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_transpose.rst b/docs/api/api_python/ops/mindspore.ops.func_transpose.rst index be00c614ea6..cd4d04593ba 100644 --- a/docs/api/api_python/ops/mindspore.ops.func_transpose.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_transpose.rst @@ -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` 的值决定。 diff --git a/mindspore/python/mindspore/nn/layer/pooling.py b/mindspore/python/mindspore/nn/layer/pooling.py index 0af4bb11d67..acda25a9f03 100644 --- a/mindspore/python/mindspore/nn/layer/pooling.py +++ b/mindspore/python/mindspore/nn/layer/pooling.py @@ -990,7 +990,7 @@ class AdaptiveMaxPool1d(Cell): Inputs: - **input** (Tensor) - Tensor of shape :math:`(N, C_{in}, L_{in})` or `(C_{in}, L_{in})`, with - float16 or float32 data type. + float16 or float32 data type. Outputs: Tensor of shape :math:`(N_{in}, C_{in}, L_{out})` or :math:`(C_{in}, L_{out})`, has the same type as `input`. @@ -1146,7 +1146,7 @@ class AdaptiveMaxPool3d(Cell): Inputs: - **input** (Tensor) - Tensor, has shape of :math:`(C, D, H, W)` or :math:`(N, C, D, H, W)` . The suppoerted - dtypes are int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32 and float64 data type. + dtypes are int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32 and float64 data type. Outputs: - **y** (Tensor) - Tensor, has the same number of dims and data type as the `input` . diff --git a/mindspore/python/mindspore/nn/layer/transformer.py b/mindspore/python/mindspore/nn/layer/transformer.py index b226de14c70..721600280d8 100644 --- a/mindspore/python/mindspore/nn/layer/transformer.py +++ b/mindspore/python/mindspore/nn/layer/transformer.py @@ -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: diff --git a/mindspore/python/mindspore/ops/function/math_func.py b/mindspore/python/mindspore/ops/function/math_func.py index af85a7eb08c..43828bfd939 100644 --- a/mindspore/python/mindspore/ops/function/math_func.py +++ b/mindspore/python/mindspore/ops/function/math_func.py @@ -2565,8 +2565,8 @@ def atan2(input, other): The data type should be one of the following types: float16, float32, float64 other (Tensor, Number.number): The input tensor or scalar. It has the same shape with `input`. - .. note:: - At least one of the input args should be Tensor. + .. note:: + At least one of the input args should be Tensor. Returns: Tensor or scalar, the shape is the same as the one after broadcasting,and the data type is same as `input`. diff --git a/mindspore/python/mindspore/ops/operations/_grad_ops.py b/mindspore/python/mindspore/ops/operations/_grad_ops.py index 2f77ce5bf1b..04e001192c7 100644 --- a/mindspore/python/mindspore/ops/operations/_grad_ops.py +++ b/mindspore/python/mindspore/ops/operations/_grad_ops.py @@ -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: diff --git a/mindspore/python/mindspore/ops/operations/sparse_ops.py b/mindspore/python/mindspore/ops/operations/sparse_ops.py index 0bd1f1950af..f0c629155c7 100644 --- a/mindspore/python/mindspore/ops/operations/sparse_ops.py +++ b/mindspore/python/mindspore/ops/operations/sparse_ops.py @@ -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 diff --git a/mindspore/python/mindspore/profiler/profiling.py b/mindspore/python/mindspore/profiler/profiling.py index 703799eb277..fa617a060d2 100644 --- a/mindspore/python/mindspore/profiler/profiling.py +++ b/mindspore/python/mindspore/profiler/profiling.py @@ -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``