Merge pull request !29515 from xumengjuan1/code_docs_xmjf3
This commit is contained in:
i-robot 2022-01-25 08:25:01 +00:00 committed by Gitee
commit a9b9d87273
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 11 deletions

View File

@ -35,11 +35,3 @@ mindspore.nn.ELU
- **TypeError** - `alpha` 不是浮点数。
- **TypeError** - `x` 的数据类型既不是float16也不是float32。
- **ValueError** - `alpha` 不等于1.0。
**样例** :
>>> x = Tensor(np.array([-1, -2, 0, 2, 1]), mindspore.float32)
>>> elu = nn.ELU()
>>> result = elu(x)
>>> print(result)
[-0.63212055 -0.86466473 0. 2. 1.]

View File

@ -41,9 +41,9 @@ mindspore.nn.Recall
- **inputs** - 输入 `y_pred``y``y_pred``y` 支持Tensor、list或numpy.ndarray类型。
对于'classification'情况,`y_pred` 在大多数情况下由范围 :math:`[0, 1]` 中的浮点数组成shape为 :math:`(N, C)` ,其中 :math:`N` 是样本数, :math:`C` 是类别数。`y` 由整数值组成如果是one_hot编码格式shape是 :math:`(N,C)` 如果是类别索引shape是 :math:`(N,)`
对于'classification'情况,`y_pred` 在大多数情况下由范围 :math:`[0, 1]` 中的浮点数组成shape为 :math:`(N, C)` ,其中 :math:`N` 是样本数, :math:`C` 是类别数。`y` 由整数值组成如果是one_hot编码格式shape是 :math:`(N,C)` 如果是类别索引shape是 :math:`(N,)`
对于'multilabel'情况,`y_pred``y` 只能是值为0或1的one-hot编码格式其中值为1的索引表示正类别。`y_pred``y` 的shape都是 :math:`(N,C)`
对于'multilabel'情况,`y_pred``y` 只能是值为0或1的one-hot编码格式其中值为1的索引表示正类别。`y_pred``y` 的shape都是 :math:`(N,C)`
**异常:**

View File

@ -7,7 +7,7 @@ mindspore.ops.Gather
下图展示了Gather常用的计算过程
.. image:: api_img/Gather.png
.. image:: Gather.png
其中params代表输入`input_params`indices代表要切片的索引`input_indices`