fcakyon
commited on
Commit
•
0e2d0d5
1
Parent(s):
b83e1a4
Fix typo (#3729)
Browse files
export.py
CHANGED
@@ -43,7 +43,7 @@ def run(weights='./yolov5s.pt', # weights path
|
|
43 |
|
44 |
# Load PyTorch model
|
45 |
device = select_device(device)
|
46 |
-
assert not (device.type == 'cpu' and
|
47 |
model = attempt_load(weights, map_location=device) # load FP32 model
|
48 |
labels = model.names
|
49 |
|
|
|
43 |
|
44 |
# Load PyTorch model
|
45 |
device = select_device(device)
|
46 |
+
assert not (device.type == 'cpu' and half), '--half only compatible with GPU export, i.e. use --device 0'
|
47 |
model = attempt_load(weights, map_location=device) # load FP32 model
|
48 |
labels = model.names
|
49 |
|