forked from mindspore-Ecosystem/mindspore
commit
6d371e5da3
|
@ -507,13 +507,6 @@ Parameter操作函数
|
|||
mindspore.ops.scatter_nd_sub
|
||||
mindspore.ops.scatter_update
|
||||
|
||||
.. list-table::
|
||||
:widths: 50 50
|
||||
:header-rows: 1
|
||||
|
||||
* - functional
|
||||
- Description
|
||||
|
||||
微分函数
|
||||
----------------
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ mindspore.nn.Adagrad
|
|||
- **weight_decay** (Union[float, int]) - 要乘以权重的权重衰减值,必须大于等于0.0。默认值:0.0。
|
||||
|
||||
输入:
|
||||
**grads** (tuple[Tensor]) - 优化器中 `params` 的梯度,形状(shape)与 `params` 相同。
|
||||
- **grads** (tuple[Tensor]) - 优化器中 `params` 的梯度,形状(shape)与 `params` 相同。
|
||||
|
||||
输出:
|
||||
Tensor[bool],值为True。
|
||||
|
|
|
@ -413,9 +413,9 @@
|
|||
参数:
|
||||
- **jit_config** (JitConfig) - Cell的Jit配置信息。目前支持下面两个配置项。
|
||||
- **jit_level** (str) - 用于设置优化图的'level'参数。 取值范围['O0'、'O1'、'O2']。默认值:'O1'。
|
||||
- **O0** :基本优化。
|
||||
- **O1** :手动优化。
|
||||
- **O2** :手动优化和图算融合。
|
||||
- **O0** :基本优化。
|
||||
- **O1** :手动优化。
|
||||
- **O2** :手动优化和图算融合。
|
||||
- **task_sink** (bool) - 是否通过数据集方式传递数据。默认值:True。
|
||||
|
||||
.. py:method:: set_boost(boost_type)
|
||||
|
|
|
@ -11,12 +11,12 @@ mindspore.nn.ConfusionMatrix
|
|||
- **num_classes** (int) - 数据集中的类别数量。
|
||||
- **normalize** (str) - 计算ConfsMatrix的参数支持四种归一化模式,默认值:'no_norm'。
|
||||
|
||||
- **"no_norm"** (None) - 不使用标准化。
|
||||
- **"target"** (str) - 基于目标值的标准化。
|
||||
- **"prediction"** (str) - 基于预测值的标准化。
|
||||
- **"all"** (str) - 整个矩阵的标准化。
|
||||
- **"no_norm"** (None) - 不使用标准化。
|
||||
- **"target"** (str) - 基于目标值的标准化。
|
||||
- **"prediction"** (str) - 基于预测值的标准化。
|
||||
- **"all"** (str) - 整个矩阵的标准化。
|
||||
|
||||
- **threshold** (float) - 阈值,用于与输入Tensor进行比较。默认值:0.5。
|
||||
- **threshold** (float) - 阈值,用于与输入Tensor进行比较。默认值:0.5。
|
||||
|
||||
.. py:method:: clear()
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ mindspore.nn.ConfusionMatrixMetric
|
|||
参数:
|
||||
- **inputs** (tuple) - `y_pred` 和 `y` 。 `y_pred` 和 `y` 是 `Tensor` 、列表或数组。
|
||||
|
||||
- **y_pred** (ndarray):待计算的输入数据。格式必须为one-hot,且第一个维度是batch。
|
||||
`y_pred` 的shape是 :math:`(N, C, ...)` 或 :math:`(N, ...)` 。
|
||||
至于分类任务, `y_pred` 的shape应为[BN],其中N大于1。对于分割任务,shape应为[BNHW]或[BNHWD]。
|
||||
- **y** (ndarray):计算度量值的真实值。格式必须为one-hot,且第一个维度是batch。`y` 的shape是 :math:`(N, C, ...)` 。
|
||||
- **y_pred** (ndarray):待计算的输入数据。格式必须为one-hot,且第一个维度是batch。
|
||||
`y_pred` 的shape是 :math:`(N, C, ...)` 或 :math:`(N, ...)` 。
|
||||
至于分类任务, `y_pred` 的shape应为[BN],其中N大于1。对于分割任务,shape应为[BNHW]或[BNHWD]。
|
||||
- **y** (ndarray):计算度量值的真实值。格式必须为one-hot,且第一个维度是batch。`y` 的shape是 :math:`(N, C, ...)` 。
|
||||
|
||||
异常:
|
||||
- **ValueError** - 输入参数的数量不等于2。
|
||||
|
|
|
@ -12,4 +12,4 @@ mindspore.nn.Flatten
|
|||
Tensor,shape为 :math:`(N, X)`,其中 :math:`X` 是输入 `x` 的shape除N之外的其余维度的乘积。
|
||||
|
||||
异常:
|
||||
**TypeError** - `x` 不是Tensor。
|
||||
- **TypeError** - `x` 不是Tensor。
|
||||
|
|
|
@ -14,7 +14,7 @@ mindspore.nn.Recall
|
|||
在多标签情况下, :math:`y` 和 :math:`y_{pred}` 的元素必须为0或1。
|
||||
|
||||
参数:
|
||||
- **eval_type** (str)- 支持'classification'和'multilabel'。默认值:'classification'。
|
||||
- **eval_type** (str) - 支持'classification'和'multilabel'。默认值:'classification'。
|
||||
|
||||
.. py:method:: clear()
|
||||
|
||||
|
|
|
@ -24,4 +24,4 @@ mindspore.nn.Sigmoid
|
|||
Tensor,数据类型和shape与 `x` 的相同。
|
||||
|
||||
异常:
|
||||
**TypeError** - `x` 的数据类型既不是float16也不是float32。
|
||||
- **TypeError** - `x` 的数据类型既不是float16也不是float32。
|
||||
|
|
|
@ -6,7 +6,7 @@ mindspore.nn.TopKCategoricalAccuracy
|
|||
计算top-k分类正确率。
|
||||
|
||||
参数:
|
||||
**k** (int) - 计算准确率使用的Top类别数。
|
||||
- **k** (int) - 计算准确率使用的Top类别数。
|
||||
|
||||
异常:
|
||||
- **TypeError** - `k` 不是int。
|
||||
|
|
|
@ -14,8 +14,8 @@ mindspore.ops.HyperMap
|
|||
输入:
|
||||
- **args** (Tuple[sequence]) - 如果 `ops` 不是None,则所有入参都应该是具有相同长度的序列,并且序列的每一行都是运算的输入。如果 `ops` 是None,则第一个入参是运算,其余都是输入。
|
||||
|
||||
.. note::
|
||||
输入数量等于 `ops` 的输入数量。
|
||||
.. note::
|
||||
输入数量等于 `ops` 的输入数量。
|
||||
|
||||
输出:
|
||||
序列或嵌套序列,执行函数如 `operation(args[0][i], args[1][i])` 之后输出的序列。
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
返回输入Tensor的实数部分。如果输入是实数,则返回值不变。
|
||||
|
||||
输入:
|
||||
- **input** (Tensor) - 要计算的输入Tensor。
|
||||
- **input** (Tensor) - 要计算的输入Tensor。
|
||||
|
||||
输出:
|
||||
Tensor,shape与输入 `input` 相同。
|
||||
Tensor,shape与输入 `input` 相同。
|
||||
|
||||
异常:
|
||||
- **TypeError** - 如果 `input` 不是Tensor。
|
||||
- **TypeError** - 如果 `input` 不是Tensor。
|
|
@ -28,7 +28,6 @@ mindspore.ops.interpolate
|
|||
|
||||
old_i = new_length != 0 ? new_i * old_length / new_length : 0 # if set to 'asymmetric'
|
||||
|
||||
|
||||
- **mode** (str) - 所使用的插值方式。目前支持"linear"和"bilinear"插值方式。默认值: "linear"。
|
||||
|
||||
返回:
|
||||
|
|
|
@ -22,8 +22,8 @@ mindspore.ops.max
|
|||
返回:
|
||||
tuple (Tensor),表示2个Tensor组成的tuple,包含对应的索引和输入Tensor的最大值。
|
||||
|
||||
- **index** (Tensor) - 输入Tensor最大值的索引。如果 `keep_dims` 为True,则输出Tensor的shape为 :math:`(x_1, x_2, ..., x_{axis-1}, 1, x_{axis+1}, ..., x_N)` 。否则,shape为 :math:`(x_1, x_2, ..., x_{axis-1}, x_{axis+1}, ..., x_N)` 。
|
||||
- **output_x** (Tensor) - 输入Tensor的最大值,其shape与索引相同。
|
||||
- **index** (Tensor) - 输入Tensor最大值的索引。如果 `keep_dims` 为True,则输出Tensor的shape为 :math:`(x_1, x_2, ..., x_{axis-1}, 1, x_{axis+1}, ..., x_N)` 。否则,shape为 :math:`(x_1, x_2, ..., x_{axis-1}, x_{axis+1}, ..., x_N)` 。
|
||||
- **output_x** (Tensor) - 输入Tensor的最大值,其shape与索引相同。
|
||||
|
||||
异常:
|
||||
- **TypeError** - `input_x` 的数据类型非float16、float32或float64。
|
||||
|
|
|
@ -488,7 +488,7 @@ Gradient Clipping
|
|||
mindspore.ops.clip_by_value
|
||||
|
||||
Parameter Operation Functions
|
||||
----------------------------
|
||||
-----------------------------
|
||||
|
||||
.. msplatformautosummary::
|
||||
:toctree: ops
|
||||
|
@ -510,13 +510,6 @@ Parameter Operation Functions
|
|||
mindspore.ops.scatter_nd_sub
|
||||
mindspore.ops.scatter_update
|
||||
|
||||
.. list-table::
|
||||
:widths: 50 50
|
||||
:header-rows: 1
|
||||
|
||||
* - functional
|
||||
- Description
|
||||
|
||||
Differential Functions
|
||||
----------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue