Skip to content

Commit

Permalink
Fix AP calculation bug ultralytics#8464 (ultralytics#8484)
Browse files Browse the repository at this point in the history
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
2 people authored and Clay Januhowski committed Sep 8, 2022
1 parent 2276307 commit 5f3a442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def run(

if npr == 0:
if nl:
stats.append((correct, *torch.zeros((3, 0), device=device)))
stats.append((correct, *torch.zeros((2, 0), device=device), labels[:, 0]))
continue

# Predictions
Expand Down

0 comments on commit 5f3a442

Please sign in to comment.