From a40f615c6f0c9b3acf3a39b3e58841c006010af2 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 5 Jul 2020 23:24:53 -0700 Subject: [PATCH] .half() bug fix --- detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 44cd64e53..d02f0a922 100644 --- a/detect.py +++ b/detect.py @@ -24,7 +24,7 @@ def detect(save_img=False): model = torch.load(weights, map_location=device)['model'].float().eval() # load FP32 model imgsz = check_img_size(imgsz, s=model.stride.max()) # check img_size if half: - model.float() # to FP16 + model.half() # to FP16 # Second-stage classifier classify = False