From b246684bfe0aa8dd613146d0965742845c18b85d Mon Sep 17 00:00:00 2001 From: Liufang Sang Date: Fri, 3 Jan 2020 15:44:33 +0800 Subject: [PATCH] add shape description in accuracy api doc test=develop test=document_preview (#1692) --- doc/fluid/api_cn/layers_cn/accuracy_cn.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/fluid/api_cn/layers_cn/accuracy_cn.rst b/doc/fluid/api_cn/layers_cn/accuracy_cn.rst index c607d770d..b83239c01 100755 --- a/doc/fluid/api_cn/layers_cn/accuracy_cn.rst +++ b/doc/fluid/api_cn/layers_cn/accuracy_cn.rst @@ -10,8 +10,8 @@ accuracy layer。 参考 https://en.wikipedia.org/wiki/Precision_and_recall 使用输入和标签计算准确率。 如果正确的标签在topk个预测值里,则计算结果加1。注意:输出正确率的类型由input类型决定,input和lable的类型可以不一样。 参数: - - **input** (Tensor|LoDTensor)-数据类型为float32,float64。输入为网络的预测值。 - - **label** (Tensor|LoDTensor)-数据类型为int64,int32。输入为数据集的标签。 + - **input** (Tensor|LoDTensor)-数据类型为float32,float64。输入为网络的预测值。shape为 ``[sample_number, class_dim]`` 。 + - **label** (Tensor|LoDTensor)-数据类型为int64,int32。输入为数据集的标签。shape为 ``[sample_number, 1]`` 。 - **k** (int64|int32) - 取每个类别中k个预测值用于计算。 - **correct** (int64|int32)-正确预测值的个数。 - **total** (int64|int32)-总共的预测值。 @@ -46,4 +46,4 @@ accuracy layer。 参考 https://en.wikipedia.org/wiki/Precision_and_recall """ Output: [array([0.6666667], dtype=float32)] - """ \ No newline at end of file + """ -- GitLab