From a62333e8084301721fa66797e8968b11b2204bbc Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 5 Jul 2020 23:27:03 -0700 Subject: [PATCH] test.py .fuse() update --- test.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test.py b/test.py index 644f6b9..2d6ab54 100644 --- a/test.py +++ b/test.py @@ -31,11 +31,8 @@ def test(data, # Load model google_utils.attempt_download(weights) - model = torch.load(weights, map_location=device)['model'].float() # load to FP32 - torch_utils.model_info(model) - model.fuse() - model.to(device) - imgsz = check_img_size(imgsz, s=model.model[-1].stride.max()) # check img_size + model = torch.load(weights, map_location=device)['model'].float().fuse() # 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 # if device.type != 'cpu' and torch.cuda.device_count() > 1: