-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix CN docs: api/paddle/metric/accuracy_cn.html #6166
Fix CN docs: api/paddle/metric/accuracy_cn.html #6166
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6166.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@@ -7,16 +7,16 @@ accuracy | |||
|
|||
accuracy layer。参考 https://en.wikipedia.org/wiki/Precision_and_recall | |||
|
|||
使用输入和标签计算准确率。如果正确的标签在 topk 个预测值里,则计算结果加 1。注意:输出正确率的类型由 input 类型决定,input 和 lable 的类型可以不一样。 | |||
使用 input 和 label 计算准确率。如果正确的 label 在 top k 个预测值里,则计算结果加 1。注意:输出正确率的类型由 input 的类型决定,input 和 label 的类型可以不一样。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要是「注解」部分用统一的格式,参考:https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/api_contributing_guides/api_docs_guidelines_cn.html#zhujie
英文的「注解」也同步进行修改
使用 input 和 label 计算准确率。如果正确的 label 在 top k 个预测值里,则计算结果加 1。注意:输出正确率的类型由 input 的类型决定,input 和 label 的类型可以不一样。 | |
使用 input 和 label 计算准确率。如果正确的 label 在 top k 个预测值里,则计算结果加 1。 | |
.. note:: | |
输出正确率的类型由 input 的类型决定,input 和 label 的类型可以不一样。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要是「注解」部分用统一的格式,参考:https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/api_contributing_guides/api_docs_guidelines_cn.html#zhujie
英文的「注解」也同步进行修改
您好,中文文档部分已修改。英文的文档应该是从 Paddle 的代码生成,所以应该在Paddle的仓库中提PR对吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
您好,中文文档部分已修改。英文的文档应该是从 Paddle 的代码生成,所以应该在Paddle的仓库中提PR对吗?
是的,英文API文档是在每个 api 源码的 doc string 里
- **input** (Tensor)-数据类型为 float32,float64 的 Tensor。accuracy layer 的输入,即网络的预测值。shape 为 ``[sample_number, class_dim]`` 。 | ||
- **label** (Tensor)-数据类型为 int64,int32 的 Tensor。数据集的标签。shape 为 ``[sample_number, 1]`` 。 | ||
- **k** (int,可选) - 数据类型为 int64,int32。取每个类别中 top k 个预测值用于计算,默认值为 1。 | ||
- **correct** (Tensor,可选) - 数据类型为 int64,int32 的 Tensor。正确预测值的个数,默认值为 None。 | ||
- **total** (Tensor,可选) - 数据类型为 int64,int32 的 Tensor。总共的预测值,默认值为 None。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺序换一下,先描述参数是什么,再描述数据类型、默认值,参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/api_contributing_guides/api_docs_guidelines_cn.html#id5
如 - **input** (Tensor)-accuracy layer 的输入,即网络的预测值。数据类型为 float32,float64 的 Tensor, shape 为 ``[sample_number, class_dim]`` 。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分也已经修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for docs
相关英文修改附在该PR描述里
PR Type:
Docs Fix/Alignment
PR Description:
Inspired by 飞桨快乐开源活动全新升级 热身任务一
Issue from https://shimo.im/sheets/2Us6FhlaVAgxfHys/ytCqF (No. 33)
References:
CN Doc: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/metric/accuracy_cn.html
EN Doc: https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/metric/accuracy_en.html