Merge a974079bd5b867303b7c77442be14c11ca312482 into 6fbaf42b23f6709f4e34a51430587673e70e151d

This commit is contained in:
Unai Gurbindo 2024-10-08 10:33:24 +00:00 committed by GitHub
commit d33e0f99a4
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_l = nt[ci] # number of labels
n_p = i.sum() # number of predictions n_p = i.sum() # number of predictions
if n_p == 0 or n_l == 0: if n_p == 0 or n_l == 0:
prec_values.append(np.zeros(1000))
continue continue
# Accumulate FPs and TPs # Accumulate FPs and TPs