test.py .fuse() update
This commit is contained in:
1 parent
a40f615c6f
commit
a62333e808
1 file changed
+2
-5
@@ -31,11 +31,8 @@ def test(data,
|
|||||||
|
|
||||||
# Load model
|
# Load model
|
||||||
google_utils.attempt_download(weights)
|
google_utils.attempt_download(weights)
|
||||||
model = torch.load(weights, map_location=device)['model'].float() # load to FP32
|
model = torch.load(weights, map_location=device)['model'].float().fuse() # load to FP32
|
||||||
torch_utils.model_info(model)
|
imgsz = check_img_size(imgsz, s=model.stride.max()) # check img_size
|
||||||
model.fuse()
|
|
||||||
model.to(device)
|
|
||||||
imgsz = check_img_size(imgsz, s=model.model[-1].stride.max()) # check img_size
|
|
||||||
|
|
||||||
# Multi-GPU disabled, incompatible with .half() https://github.com/ultralytics/yolov5/issues/99
|
# Multi-GPU disabled, incompatible with .half() https://github.com/ultralytics/yolov5/issues/99
|
||||||
# if device.type != 'cpu' and torch.cuda.device_count() > 1:
|
# if device.type != 'cpu' and torch.cuda.device_count() > 1:
|
||||||
|
|||||||
Reference in new issue
Block a user