From 3ecea98a3c141af994bfb288c7cfd5cbb049280f Mon Sep 17 00:00:00 2001 From: UnglvKitDe <100289696+UnglvKitDe@users.noreply.github.com> Date: Tue, 5 Jul 2022 23:28:41 +0200 Subject: [PATCH] Fix ap calculation bug #8464 --- 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