forked from mindspore-Ecosystem/mindspore
!29515 modify doc
Merge pull request !29515 from xumengjuan1/code_docs_xmjf3
This commit is contained in:
commit
a9b9d87273
|
@ -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.]
|
|
@ -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)` 。
|
||||
|
||||
**异常:**
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ mindspore.ops.Gather
|
|||
|
||||
下图展示了Gather常用的计算过程:
|
||||
|
||||
.. image:: api_img/Gather.png
|
||||
.. image:: Gather.png
|
||||
|
||||
其中,params代表输入`input_params`,indices代表要切片的索引`input_indices`。
|
||||
|
||||
|
|
Loading…
Reference in New Issue