Browse Source

Empty val batch CUDA device fix (#7539)

Verified fix for https://github.com/ultralytics/yolov5/pull/7525#issuecomment-1106081123
modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
813eba85b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      val.py

+ 1
- 1
val.py View File

@@ -227,7 +227,7 @@ def run(

if npr == 0:
if nl:
stats.append((correct, *torch.zeros((3, 0))))
stats.append((correct, *torch.zeros((3, 0), device=device)))
continue

# Predictions

Loading…
Cancel
Save