modify format

This commit is contained in:
huodagu 2022-09-22 15:53:24 +08:00
parent 9468f237c4
commit 0b2c0900a3
7 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
mindspore.Tensor.tile mindspore.Tensor.tile
===================== =====================
.. py:class:: mindspore.Tensor.tile(multiples) .. py:method:: mindspore.Tensor.tile(multiples)
按照给定的次数复制输入Tensor。 按照给定的次数复制输入Tensor。

View File

@ -1,7 +1,7 @@
mindspore.ops.CustomRegOp mindspore.ops.CustomRegOp
========================= =========================
.. py:class:: mindspore.ops.CustomRegOp(op_name) .. py:class:: mindspore.ops.CustomRegOp(op_name="Custom")
用于为 :class:`mindspore.ops.Custom``func` 参数生成算子注册信息的类。注册信息主要指定了 `func` 的输入和输出Tensor所支持的数据类型和数据格式、属性以及target信息。 用于为 :class:`mindspore.ops.Custom``func` 参数生成算子注册信息的类。注册信息主要指定了 `func` 的输入和输出Tensor所支持的数据类型和数据格式、属性以及target信息。
@ -21,7 +21,7 @@ mindspore.ops.CustomRegOp
- "dynamic": 表示第 `index` 个输入存在且Tensor个数可能为多个比如AddN算子的输入属于这种情况。 - "dynamic": 表示第 `index` 个输入存在且Tensor个数可能为多个比如AddN算子的输入属于这种情况。
- "optional": 表示第 `index` 个输入存在且为单个Tensor或者也可能不存在。 - "optional": 表示第 `index` 个输入存在且为单个Tensor或者也可能不存在。
- **kwargs** (dict) - 表示输入的其他信息,用于扩展。 - **\*\*kwargs** (dict) - 表示输入的其他信息,用于扩展。
异常: 异常:
- **TypeError** - `index` 既不是int也不是None。 - **TypeError** - `index` 既不是int也不是None。
@ -41,7 +41,7 @@ mindspore.ops.CustomRegOp
- "dynamic": 表示第 `index` 个输出存在且Tensor个数可能为多个。 - "dynamic": 表示第 `index` 个输出存在且Tensor个数可能为多个。
- "optional": 表示第 `index` 个输出存在且为单个Tensor或者也可能不存在。 - "optional": 表示第 `index` 个输出存在且为单个Tensor或者也可能不存在。
- **kwargs** (dict) - 表示输出的其他信息,用于扩展。 - **\*\*kwargs** (dict) - 表示输出的其他信息,用于扩展。
异常: 异常:
- **TypeError** - `index` 既不是int也不是None。 - **TypeError** - `index` 既不是int也不是None。
@ -53,7 +53,7 @@ mindspore.ops.CustomRegOp
指定 :class:`mindspore.ops.Custom``func` 参数的每个输入Tensor和输出Tensor所支持的数据类型和数据格式。正如上面给出的样例该函数应在 `input``output` 函数之后被调用。 指定 :class:`mindspore.ops.Custom``func` 参数的每个输入Tensor和输出Tensor所支持的数据类型和数据格式。正如上面给出的样例该函数应在 `input``output` 函数之后被调用。
参数: 参数:
- **args** (tuple) - 表示(数据类型、格式)组合的列表,`args` 的长度应该等于输入Tensor和输出Tensor数目的总和。 `args` 中的每一项也是一个tupletuple[0]和tuple[1]都是str类型分别指定了一个Tensor的数据类型和数据格式。 :class:`mindspore.ops.DataType` 提供了很多预定义的(数据类型、格式)组合,例如 `DataType.F16_Default` 表示数据类型是float16数据格式是默认格式。 - **\*args** (tuple) - 表示(数据类型、格式)组合的列表,`args` 的长度应该等于输入Tensor和输出Tensor数目的总和。 `args` 中的每一项也是一个tupletuple[0]和tuple[1]都是str类型分别指定了一个Tensor的数据类型和数据格式。 :class:`mindspore.ops.DataType` 提供了很多预定义的(数据类型、格式)组合,例如 `DataType.F16_Default` 表示数据类型是float16数据格式是默认格式。
异常: 异常:
- **ValueError** - `args` 的长度不等于输入Tensor和输出Tensor数目的总和。 - **ValueError** - `args` 的长度不等于输入Tensor和输出Tensor数目的总和。
@ -81,7 +81,7 @@ mindspore.ops.CustomRegOp
- "listFloat": Python list of float类型的字符串表示。 - "listFloat": Python list of float类型的字符串表示。
- **default_value** (str) - 表示属性的默认值。 `default_value``value_type` 配合使用。如果属性实际的默认值为1.0,那么 `value_type` 是"float", `default_value` 是"1.0"。如果属性实际的默认值是[1, 2, 3],那么 `value_type` 是"listInt", `default_value` 是"1,2,3",其中数值通过','分割。如果该值为None键"default_value"将不会出现在属性信息字典中。目前用于"akg"、"aicpu"和"tbe"类型的自定义算子。默认值None。 - **default_value** (str) - 表示属性的默认值。 `default_value``value_type` 配合使用。如果属性实际的默认值为1.0,那么 `value_type` 是"float", `default_value` 是"1.0"。如果属性实际的默认值是[1, 2, 3],那么 `value_type` 是"listInt", `default_value` 是"1,2,3",其中数值通过','分割。如果该值为None键"default_value"将不会出现在属性信息字典中。目前用于"akg"、"aicpu"和"tbe"类型的自定义算子。默认值None。
- **kwargs** (dict) - 表示属性的其他信息,用于扩展。 - **\*\*kwargs** (dict) - 表示属性的其他信息,用于扩展。
异常: 异常:
- **TypeError** - `name` 既不是str也不是None。 - **TypeError** - `name` 既不是str也不是None。

View File

@ -1,7 +1,7 @@
mindspore.ops.func_bias_add mindspore.ops.bias_add
=========================== ===========================
.. py:class:: mindspore.ops.bias_add(input_x, bias) .. py:function:: mindspore.ops.bias_add(input_x, bias)
返回输入Tensor与偏置Tensor之和。相加前会把偏置Tensor广播成与输入Tensor的shape一致。 返回输入Tensor与偏置Tensor之和。相加前会把偏置Tensor广播成与输入Tensor的shape一致。

View File

@ -25,7 +25,7 @@ mindspore.ops.binary_cross_entropy
参数: 参数:
- **logits** (Tensor) - 输入预测值任意维度的Tensor。其数据类型为float16或float32。 - **logits** (Tensor) - 输入预测值任意维度的Tensor。其数据类型为float16或float32。
- **label** (Tensor) - 输入目标值shape与 `logits` 相同。数据类型为float16或float32。 - **labels** (Tensor) - 输入目标值shape与 `logits` 相同。数据类型为float16或float32。
- **weight** (Tensor) - 指定每个批次二值交叉熵的权重。支持广播使其shape与 `logits` 的shape保持一致。数据类型必须为float16或float32。 - **weight** (Tensor) - 指定每个批次二值交叉熵的权重。支持广播使其shape与 `logits` 的shape保持一致。数据类型必须为float16或float32。
- **reduction** (str) - 指定用于输出结果的计算方式。取值为 'mean' 、 'sum' 或 'none' ,不区分大小写。如果 'none' ,则不执行 `reduction` 。默认值:'mean' 。 - **reduction** (str) - 指定用于输出结果的计算方式。取值为 'mean' 、 'sum' 或 'none' ,不区分大小写。如果 'none' ,则不执行 `reduction` 。默认值:'mean' 。

View File

@ -2121,7 +2121,7 @@ class KLDivLoss(LossBase):
- **logits** (Tensor) - The input Tensor. The data type must be float16, float32 or float64. - **logits** (Tensor) - The input Tensor. The data type must be float16, float32 or float64.
- **labels** (Tensor) - The label Tensor which has the same shape and data type as `logits`. - **labels** (Tensor) - The label Tensor which has the same shape and data type as `logits`.
Returns: Outputs:
Tensor or Scalar, if `reduction` is 'none', then output is a tensor and has the same shape as `logits`. Tensor or Scalar, if `reduction` is 'none', then output is a tensor and has the same shape as `logits`.
Otherwise, it is a scalar. Otherwise, it is a scalar.

View File

@ -5193,7 +5193,7 @@ def bmm(input_x, mat2):
size of the last two dimensions. size of the last two dimensions.
mat2 (Tensor): The second tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`. mat2 (Tensor): The second tensor to be multiplied. The shape of the tensor is :math:`(*B, C, M)`.
Outputs: Returns:
Tensor, the shape of the output tensor is :math:`(*B, N, M)`. Tensor, the shape of the output tensor is :math:`(*B, N, M)`.
Raises: Raises:

View File

@ -2816,7 +2816,7 @@ def adaptive_max_pool1d(input_x, output_size):
input_x (Tensor): Tensor of shape :math:`(N, C_{in}, L_{in})`, with float16 or float32 data type. input_x (Tensor): Tensor of shape :math:`(N, C_{in}, L_{in})`, with float16 or float32 data type.
output_size (int): the target output size :math:`L_{out}`. output_size (int): the target output size :math:`L_{out}`.
Outputs: Returns:
Tensor of shape :math:`(N, C_{in}, L_{out})`, has the same type as `input_x`. Tensor of shape :math:`(N, C_{in}, L_{out})`, has the same type as `input_x`.
Raises: Raises: