Skip to content

Commit

Permalink
.to(device) bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jul 6, 2020
1 parent 936fcb8 commit 4326f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test(data,

# Load model
google_utils.attempt_download(weights)
model = torch.load(weights, map_location=device)['model'].float().fuse() # load to FP32
model = torch.load(weights, map_location=device)['model'].float().fuse().to(device) # load to FP32
imgsz = check_img_size(imgsz, s=model.stride.max()) # check img_size

# Multi-GPU disabled, incompatible with .half() https://github.com/ultralytics/yolov5/issues/99
Expand Down

0 comments on commit 4326f6d

Please sign in to comment.