From 39d7a93619083cb8e37f5ef7708cf50b34e20ee1 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 f4f4bab..77f6bbf 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