Merge a974079bd5b867303b7c77442be14c11ca312482 into 453c6e38a51e9d1d5a2aa5fb7f1014a711913397

This commit is contained in:
Unai Gurbindo 2025-03-15 18:57:04 +08:00 committed by GitHub
commit af057b0c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -581,6 +581,7 @@ def ap_per_class(
n_l = nt[ci] # number of labels
n_p = i.sum() # number of predictions
if n_p == 0 or n_l == 0:
prec_values.append(np.zeros(1000))
continue
# Accumulate FPs and TPs