diff --git a/docs/api/api_python/ops/mindspore.ops.RaggedRange.rst b/docs/api/api_python/ops/mindspore.ops.RaggedRange.rst index a0fd9a596a5..32ab8fe1369 100644 --- a/docs/api/api_python/ops/mindspore.ops.RaggedRange.rst +++ b/docs/api/api_python/ops/mindspore.ops.RaggedRange.rst @@ -16,7 +16,7 @@ mindspore.ops.RaggedRange 输出: - **rt_nested_splits** (Tensor) - 返回RagdTensor的嵌套拆分Tensor,数据类型类型为 `Tsplits` 。shape等于输入 `starts` 的shape加1。 - **rt_dense_values** (Tensor) - 返回RagdTensor的密集值Tensor,其数据类型与输入 `starts` 相同。设输入 `starts、` `limits` 和 `delta` 的大小为i。 - - 如果 `starts` 、 `limits` 和 `delta` 的数据类型为int32或int64,则输出 `rt_dense_values` 的shape等于 :math:`sum(abs(limits[i] - starts[i]) + abs(deltas[i]) - 1) / abs(deltas[i]))` 。 + - 如果 `starts` 、 `limits` 和 `delta` 的数据类型为int32或int64,则输出 `rt_dense_values` 的shape等于 :math:`sum(abs(limits[i] - starts[i]) + abs(deltas[i] - 1) / abs(deltas[i]))` 。 - 如果 `starts` 、 `limits` 和 `delta` 的数据类型为float32或者float64,则输出 `rt_dense_values` 的shape等于 :math:`sum(ceil(abs((limits[i] - starts[i]) / deltas[i]))` 。 异常: diff --git a/mindspore/python/mindspore/common/mutable.py b/mindspore/python/mindspore/common/mutable.py index b4c8140130f..32189bd8c8c 100644 --- a/mindspore/python/mindspore/common/mutable.py +++ b/mindspore/python/mindspore/common/mutable.py @@ -76,7 +76,7 @@ def mutable(input_data, dynamic_len=False): the length of the tuple or list is different for each run, it does not need to be re-compiled. Args: - input_data (Union[int, float, Tensor, tuple, list, dict): The input data to be made mutable. If + input_data (Union[int, float, Tensor, tuple, list, dict]): The input data to be made mutable. If 'input_data' is list/tuple/dict, the type of each element should also in the valid types. dynamic_len (bool): Whether to set the whole sequence to be dynamic length. In graph compilation, if `dynamic_len` is True, the `input_data` must be list or tuple and the elements of `input_data` must have diff --git a/mindspore/python/mindspore/dataset/vision/transforms.py b/mindspore/python/mindspore/dataset/vision/transforms.py index 103733b1e16..888a31b42fc 100644 --- a/mindspore/python/mindspore/dataset/vision/transforms.py +++ b/mindspore/python/mindspore/dataset/vision/transforms.py @@ -1591,7 +1591,7 @@ class Pad(ImageTensorOperation, PyTensorOperation): value of edge. Raises: - TypeError: If `padding` is not of type int or Sequence[int, int], Sequence[int, int, int, int]]. + TypeError: If `padding` is not of type int or Sequence[int, int], Sequence[int, int, int, int]. TypeError: If `fill_value` is not of type int or tuple[int]. TypeError: If `padding_mode` is not of type :class:`mindspore.dataset.vision.Border` . ValueError: If `padding` is negative. diff --git a/mindspore/python/mindspore/nn/layer/pooling.py b/mindspore/python/mindspore/nn/layer/pooling.py index db072766eca..ec492b66d57 100644 --- a/mindspore/python/mindspore/nn/layer/pooling.py +++ b/mindspore/python/mindspore/nn/layer/pooling.py @@ -1415,8 +1415,8 @@ class MaxUnpool1d(Cell): MaxUnpool1d takes in as input the output of MaxPool1d including the indices of the maximal values and computes a partial inverse in which all non-maximal values are set to zero. Typically the input - is of shape :math:`(N, C, H_{in})` or :math:`(C, H_{in})`, and the output is of shape :math:`(N, C, H_{out}` - or :math:`(C, H_{out}`. The operation is as follows. + is of shape :math:`(N, C, H_{in})` or :math:`(C, H_{in})`, and the output is of shape :math:`(N, C, H_{out})` + or :math:`(C, H_{out})`. The operation is as follows. .. math:: \begin{array}{ll} \\ diff --git a/mindspore/python/mindspore/nn/transformer/layers.py b/mindspore/python/mindspore/nn/transformer/layers.py index 6e73da129aa..84f49a31969 100644 --- a/mindspore/python/mindspore/nn/transformer/layers.py +++ b/mindspore/python/mindspore/nn/transformer/layers.py @@ -575,7 +575,7 @@ class FixedSparseAttention(nn.Cell): queries to query the context. - **k** (Tensor) - Tensor key ( `mstype.fp16` [batch_size, seq_length, hidden_size]): Sequence of queries to query the context. - - **v** (Tensor) - Tensor value `mstype.fp16` [batch size, sequence length, Embedding Size]): + - **v** (Tensor) - Tensor value ( `mstype.fp16` [batch size, sequence length, Embedding Size]): Sequence of queries to query the context. - **attention_mask** (Tensor) - Float Tensor the mask of ( `mstype.fp32`, `mstype.fp16` [batch_size, seq_length, seq_length]): Lower triangular matrix to pass masked information. diff --git a/mindspore/python/mindspore/ops/function/nn_func.py b/mindspore/python/mindspore/ops/function/nn_func.py index e036cfd2cda..d251dad8153 100644 --- a/mindspore/python/mindspore/ops/function/nn_func.py +++ b/mindspore/python/mindspore/ops/function/nn_func.py @@ -1939,7 +1939,7 @@ def interpolate(x, size=None, scale_factor=None, mode="nearest", align_corners=N x (Tensor): Tensor to be resized. Input tensor must be a 3-D, 4-D, or 5-D tensor with shape `(batch, channels, [optional depth], [optional height], width)`, with data type of float. - size (Union[int, tuple[int], list[int]], optional)): The target size. + size (Union[int, tuple[int], list[int]], optional): The target size. If size is a tuple or list, size must have the same dimensions as x. One and only one of size and scale_factor can be set to None. Default: None. scale_factor (Union[float, tuple[float], list[float]], optional): The scale factor of new size of the tensor. @@ -1996,7 +1996,7 @@ def interpolate(x, size=None, scale_factor=None, mode="nearest", align_corners=N - `×` indicates that this parameter is not currently supported. - `√` indicates that this parameter is supported. - Outputs: + Returns: Tensor, resized, whose dimensions and dtype are the same as `x`. Raises: diff --git a/mindspore/python/mindspore/ops/operations/math_ops.py b/mindspore/python/mindspore/ops/operations/math_ops.py index d79b3d295ce..a6512b2f9ef 100644 --- a/mindspore/python/mindspore/ops/operations/math_ops.py +++ b/mindspore/python/mindspore/ops/operations/math_ops.py @@ -6644,7 +6644,7 @@ class RaggedRange(Primitive): - if type of the input `starts`, input `limits` and input `deltas` are int32 or int64, shape of the output `rt_dense_values` is equal to - sum(abs(limits[i] - starts[i]) + abs(deltas[i]) - 1) / abs(deltas[i])), + sum(abs(limits[i] - starts[i]) + abs(deltas[i] - 1) / abs(deltas[i])), - if type of the input `starts`, input `limits` and input `deltas` are float32 or float64, shape of the output `rt_dense_values` is equal to sum(ceil(abs((limits[i] - starts[i]) / deltas[i]))). diff --git a/mindspore/python/mindspore/train/callback/_landscape.py b/mindspore/python/mindspore/train/callback/_landscape.py index dde0b2afd27..f55f93e0ec6 100644 --- a/mindspore/python/mindspore/train/callback/_landscape.py +++ b/mindspore/python/mindspore/train/callback/_landscape.py @@ -282,7 +282,7 @@ class SummaryLandscape: For example, in image dataset, You can set num_samples is 2048, which means that 2048 images are used to create loss landscape. Default: 2048. - - intervals (List[List[int]): Specifies the interval + - intervals (List[List[int]]): Specifies the interval in which the loss landscape. For example: If the user wants to create loss landscape of two training processes, they are 1-5 epoch and 6-10 epoch respectively. They can set [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]].