Skip to content

Commit

Permalink
Empty val batch CUDA device fix (#7539)
Browse files Browse the repository at this point in the history
Verified fix for #7525 (comment)
  • Loading branch information
glenn-jocher committed Apr 22, 2022
1 parent b804b36 commit 813eba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 813eba8

Please sign in to comment.