Browse Source

Disallow `--dynamic` when `--half` is passed (#7669)

* 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>
modifyDataloader
David Matos GitHub 2 years ago
parent
commit
bff6e51bc4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      export.py

+ 1
- 0
export.py View File

@@ -478,6 +478,7 @@ def run(
device = select_device(device)
if half:
assert device.type != 'cpu' or coreml or xml, '--half only compatible with GPU export, i.e. use --device 0'
assert not dynamic, '--half not compatible with --dynamic, i.e. use either --half or --dynamic but not both'
model = attempt_load(weights, map_location=device, inplace=True, fuse=True) # load FP32 model
nc, names = model.nc, model.names # number of classes, class names


Loading…
Cancel
Save