glenn-jocher
commited on
Commit
·
a40f615
1
Parent(s):
04bdbe4
.half() bug fix
Browse files
detect.py
CHANGED
@@ -24,7 +24,7 @@ def detect(save_img=False):
|
|
24 |
model = torch.load(weights, map_location=device)['model'].float().eval() # load FP32 model
|
25 |
imgsz = check_img_size(imgsz, s=model.stride.max()) # check img_size
|
26 |
if half:
|
27 |
-
model.
|
28 |
|
29 |
# Second-stage classifier
|
30 |
classify = False
|
|
|
24 |
model = torch.load(weights, map_location=device)['model'].float().eval() # load FP32 model
|
25 |
imgsz = check_img_size(imgsz, s=model.stride.max()) # check img_size
|
26 |
if half:
|
27 |
+
model.half() # to FP16
|
28 |
|
29 |
# Second-stage classifier
|
30 |
classify = False
|