From 311fbaef968c78aa19121c8f61aab0c7e0e64c52 Mon Sep 17 00:00:00 2001 From: xumengjuan1 Date: Tue, 25 Jan 2022 16:00:34 +0800 Subject: [PATCH] modify doc --- docs/api/api_python/nn/mindspore.nn.ELU.rst | 8 -------- docs/api/api_python/nn/mindspore.nn.Recall.rst | 4 ++-- docs/api/api_python/ops/mindspore.ops.Gather.rst | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/api/api_python/nn/mindspore.nn.ELU.rst b/docs/api/api_python/nn/mindspore.nn.ELU.rst index 018e83c9489..b425d80796f 100644 --- a/docs/api/api_python/nn/mindspore.nn.ELU.rst +++ b/docs/api/api_python/nn/mindspore.nn.ELU.rst @@ -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.] \ No newline at end of file diff --git a/docs/api/api_python/nn/mindspore.nn.Recall.rst b/docs/api/api_python/nn/mindspore.nn.Recall.rst index 4e252aea497..4d437294edf 100644 --- a/docs/api/api_python/nn/mindspore.nn.Recall.rst +++ b/docs/api/api_python/nn/mindspore.nn.Recall.rst @@ -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)` 。 **异常:** diff --git a/docs/api/api_python/ops/mindspore.ops.Gather.rst b/docs/api/api_python/ops/mindspore.ops.Gather.rst index 33358ca3a99..c1a297c51aa 100644 --- a/docs/api/api_python/ops/mindspore.ops.Gather.rst +++ b/docs/api/api_python/ops/mindspore.ops.Gather.rst @@ -7,7 +7,7 @@ mindspore.ops.Gather 下图展示了Gather常用的计算过程: - .. image:: api_img/Gather.png + .. image:: Gather.png 其中,params代表输入`input_params`,indices代表要切片的索引`input_indices`。