pytor三件套版本为
onnx版本为1.16
cuda版本为11.6
执行python export.py --weights 我的路径/best.pt --include onnx --device 0
当export.py下的--opset参数default=14/15/16时会报错“Unsupported ONNX opset version: 16”;
当--opset参数default=11/12/13,“export failure 0.3s: Exporting the operator hardsigmoid to ONNX opset version 11 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.”
查很多帖子,有的是改--opset为某个数字就可以了,但我的不行。
最后在这个帖子找到正确方法解决报错问题:the operator silu to ONNX opset version 12 is not supported - 知乎 (zhihu.com)
在你项目使用的虚拟环