UnglvKitDe glenn-jocher commited on
Commit
39d7a93
1 Parent(s): dd28df9

Fix AP calculation bug #8464 (#8484)

Browse files

Co-authored-by: Glenn Jocher <[email protected]>

Files changed (1) hide show
  1. val.py +1 -1
val.py CHANGED
@@ -227,7 +227,7 @@ def run(
227
 
228
  if npr == 0:
229
  if nl:
230
- stats.append((correct, *torch.zeros((3, 0), device=device)))
231
  continue
232
 
233
  # Predictions
 
227
 
228
  if npr == 0:
229
  if nl:
230
+ stats.append((correct, *torch.zeros((2, 0), device=device), labels[:, 0]))
231
  continue
232
 
233
  # Predictions