备注
您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程、迁移教程以及更新日志。
mmcls.core.mAP¶
- mmcls.core.mAP(pred, target)[源代码]¶
Calculate the mean average precision with respect of classes.
- 参数
pred (torch.Tensor | np.ndarray) – The model prediction with shape (N, C), where C is the number of classes.
target (torch.Tensor | np.ndarray) – The target of each prediction with shape (N, C), where C is the number of classes. 1 stands for positive examples, 0 stands for negative examples and -1 stands for difficult examples.
- 返回
A single float as mAP value.
- 返回类型