其他分享
首页 > 其他分享> > pytorch转onnx再转ncnn出错

pytorch转onnx再转ncnn出错

作者:互联网

原因:pytorch转换的onnx有很多冗余需要简化

Shape not supported yet!
Gather not supported yet!
  # axis=0
Unsupported unsqueeze axes !
Unknown data type 0
Shape not supported yet!
Gather not supported yet!
  # axis=0
Unsupported unsqueeze axes !
Unknown data type 0
Shape not supported yet!
Gather not supported yet!

pytorch转onnx再转ncnn出错

pytorch生成onnx转换模型时有一些冗余,我们用工具简化一下onnx模型
执行下面命令
pip install onnx-simplifier
python -m onnxsim face.onnx face_sim.onnx 转换就是正常的了
附上大佬的github链接:https://github.com/biubug6/Face-Detector-1MB-with-landmark/issues/1

Windows下ncnn环境配置

https://blog.csdn.net/qq_36890370/article/details/104966786

标签:supported,onnx,Gather,pytorch,ncnn,yet
来源: https://blog.csdn.net/qq_33346150/article/details/111462038