python export.py --weights runs/train/exp6/weights/best.pt --include onnx
yolov5 训练好的pt文件导出onnx 导出失败
异常信息:
Fusing layers…
YOLOv5s summary: 157 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs
PyTorch: starting from runs/train/exp6/weights/best.pt with output shape (1, 48384, 6) (14.0 MB)
ONNX: starting export with onnx 1.14.1...
ONNX: export failure ❌ 0.0s: Unsupported ONNX opset version: 17
请注意这个 opset version: 17
版本如果默认是17需要修改一下 不然对应不上就不能导出