onnx export IO layer names update
This commit is contained in:
parent
748f60baae
commit
dda0afa22e
|
@ -45,7 +45,8 @@ def detect(save_img=False):
|
||||||
model.fuse()
|
model.fuse()
|
||||||
img = torch.zeros((1, 3) + img_size) # (1, 3, 320, 192)
|
img = torch.zeros((1, 3) + img_size) # (1, 3, 320, 192)
|
||||||
f = opt.weights.replace(opt.weights.split('.')[-1], 'onnx') # *.onnx filename
|
f = opt.weights.replace(opt.weights.split('.')[-1], 'onnx') # *.onnx filename
|
||||||
torch.onnx.export(model, img, f, verbose=False, opset_version=11)
|
torch.onnx.export(model, img, f, verbose=False, opset_version=11,
|
||||||
|
input_names=['images'], output_names=['classes', 'boxes'])
|
||||||
|
|
||||||
# Validate exported model
|
# Validate exported model
|
||||||
import onnx
|
import onnx
|
||||||
|
|
Loading…
Reference in New Issue