Unverified 提交 c215e873 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

XML export `--half` fix (#8522)

上级 63ba0cb1
...@@ -484,7 +484,7 @@ def run( ...@@ -484,7 +484,7 @@ def run(
# Load PyTorch model # Load PyTorch model
device = select_device(device) device = select_device(device)
if half: 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' 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 model = attempt_load(weights, device=device, inplace=True, fuse=True) # load FP32 model
nc, names = model.nc, model.names # number of classes, class names nc, names = model.nc, model.names # number of classes, class names
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论