Skip to content

Commit

Permalink
XML export --half fix (ultralytics#8522)
Browse files Browse the repository at this point in the history
Improved error reporting for ultralytics#8519
  • Loading branch information
glenn-jocher authored and Shivvrat committed Jul 12, 2022
1 parent 1eefac9 commit 14e87dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def run(
# Load PyTorch model
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 device.type != 'cpu' or coreml, '--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, device=device, inplace=True, fuse=True) # load FP32 model
nc, names = model.nc, model.names # number of classes, class names
Expand Down

0 comments on commit 14e87dc

Please sign in to comment.