瀏覽代碼

.to(device) bug fix

5.0
Glenn Jocher 4 年之前
父節點
當前提交
6b95d6d2c0
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      test.py

+ 1
- 1
test.py 查看文件

@@ -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

Loading…
取消
儲存