Commit
•
bff6e51
1
Parent(s):
1994ad9
Disallow `--dynamic` when `--half` is passed (#7669)
Browse files* disallow dynamic arg when half is given
* Update export.py
Co-authored-by: David Matos <david@track32.nl>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
export.py
CHANGED
@@ -478,6 +478,7 @@ def run(
|
|
478 |
device = select_device(device)
|
479 |
if half:
|
480 |
assert device.type != 'cpu' or coreml or xml, '--half only compatible with GPU export, i.e. use --device 0'
|
|
|
481 |
model = attempt_load(weights, map_location=device, inplace=True, fuse=True) # load FP32 model
|
482 |
nc, names = model.nc, model.names # number of classes, class names
|
483 |
|
|
|
478 |
device = select_device(device)
|
479 |
if half:
|
480 |
assert device.type != 'cpu' or coreml or xml, '--half only compatible with GPU export, i.e. use --device 0'
|
481 |
+
assert not dynamic, '--half not compatible with --dynamic, i.e. use either --half or --dynamic but not both'
|
482 |
model = attempt_load(weights, map_location=device, inplace=True, fuse=True) # load FP32 model
|
483 |
nc, names = model.nc, model.names # number of classes, class names
|
484 |
|