top1和top5 error直白理解

结论
直接上结论,既然是error所以,top-1 error rate和top-5 error rate越小说明模型越准确。

作用
出自于ImageNet,用于评判模型的性能,比如ImageNet Classification with Deep Convolutional Neural Networks一文中就有对于top-5 error rate的描述:

where the top-5 error rate is the fraction of test images for which the correct label is not among the five labels considered most probable by the model.

含义
根据以上描述,用很直白的话描述就是:

top-5 error rate:模型训练前设定了很多类别,模型训练后样本被划分到每个类别都有一定的概率,取概率最大的5个类别,即top5,只要有一个是符合样本的类别就算对,反之就算预测失败,用预测失败的样本数量比上总数就是top-5 error rate。
top-1 error rate:只取概率最大的那1个类别,即top1,其他条件同上。
————————————————
版权声明:本文为CSDN博主「凡心curry」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_44853840/article/details/116565121

posted @ 2022-02-16 15:26  笨笨和呆呆  阅读(627)  评论(0)    收藏  举报