Skip to content

Commit

Permalink
update metric mAP
Browse files Browse the repository at this point in the history
  • Loading branch information
zzc98 committed Sep 23, 2022
1 parent 2388b7f commit ae50a2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmcls/evaluation/metrics/multi_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def _average_precision(pred: torch.Tensor,
pred_pos_nums[pred_pos_nums < eps] = eps

tps[torch.logical_not(pos_inds)] = 0
precision = tps / pred_pos_nums
precision = tps / pred_pos_nums.float()
ap = torch.sum(precision, 0) / max(total_pos, eps)
return ap

Expand Down

0 comments on commit ae50a2c

Please sign in to comment.