Skip to content

Commit

Permalink
Fix ap calculation bug ultralytics#8464
Browse files Browse the repository at this point in the history
  • Loading branch information
UnglvKitDe committed Jul 5, 2022
1 parent fdc9d91 commit 3ecea98
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 3ecea98

Please sign in to comment.