`mean_average_precision`: float64 输入中缺失了召回阈值 0.1、0.2、0.3、0.4、0.6 和 0.8
mean_average_precision builds its 11 recall thresholds with torch.arange(start=0, end=1.1, step=0.1).tolist(), in kornia/metrics/mean_average_precision.py. The arange is float32, so the thresholds are float32 values widened to Python floats: 0.10000000149, 0.20000000298, 0.30000001192, 0.40000000596, 0.60000002384 and 0.80000001192.
A float32, float16 or bfloat16 recall tensor compares against each threshold in its own dtype, so a recall of exactly 1/10 reaches the 0.1 threshold. A float64 recall of 1/10 is 0.1000000000000000055, which is below 0.10000000149, so float64 inputs skip that threshold. The same happens to every recall that lands exactly on 0.1, 0.2, 0.3, 0.4, 0.6 or 0.8. That is common: any class with 5 or 10 objects hits them.
内容来源: kornia/kornia