From 5f3a4429367102e9a2e97e471b245e279fd78e60 Mon Sep 17 00:00:00 2001 From: UnglvKitDe <100289696+UnglvKitDe@users.noreply.github.com> Date: Thu, 7 Jul 2022 20:42:09 +0200 Subject: [PATCH] Fix AP calculation bug #8464 (#8484) Co-authored-by: Glenn Jocher --- val.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/val.py b/val.py index f4f4bab7e92d..77f6bbf5b7c2 100644 --- a/val.py +++ b/val.py @@ -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