Skip to content

Commit 0170fa1

Browse files
dmatos2012David Matosglenn-jocher
authored andcommitted
Disallow --dynamic when --half is passed (ultralytics#7669)
* disallow dynamic arg when half is given * Update export.py Co-authored-by: David Matos <[email protected]> Co-authored-by: Glenn Jocher <[email protected]>
1 parent c89cad9 commit 0170fa1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

export.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ def run(
597597
device = select_device(device)
598598
if half:
599599
assert device.type != 'cpu' or coreml or xml, '--half only compatible with GPU export, i.e. use --device 0'
600+
assert not dynamic, '--half not compatible with --dynamic, i.e. use either --half or --dynamic but not both'
600601
model = attempt_load(weights, map_location=device, inplace=True, fuse=True) # load FP32 model
601602
nc, names = model.nc, model.names # number of classes, class names
602603

0 commit comments

Comments
 (0)