提交 b246684b 编写于 作者: L Liufang Sang 提交者: Bai Yifan

add shape description in accuracy api doc test=develop test=document_preview (#1692)

上级 e9411e09
......@@ -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
"""
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册