ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

Convert efficientnetv2-s_in21k-pre_3rdparty_in1k from onnx to ncnn issue

Open RTae opened this issue 2 years ago • 1 comments

error log | 日志或报错信息 | ログ

Shape not supported yet!
Unsupported unsqueeze axes !
Unsupported unsqueeze axes !
Unsupported unsqueeze axes !
Unsupported unsqueeze axes !
Unsupported slice step !
Unknown data type 0
Segmentation fault (core dumped)

model | 模型 | モデル

  1. using model from MMPretrain link

how to reproduce | 复现步骤 | 再現方法

  1. Convert model from pth to onnx (Using method from MMDeploy)
  2. Be able to inference the model using ONNX
  3. Simplify model using onnx-sim
  4. Convert ONNX model from simplify version to ncnn
  5. Got a error

The issue might cause from NCNN layer doesn't support efficientnetv2 layer. Do anyone have a suggestion for this issue

RTae avatar Jan 12 '24 12:01 RTae

针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn In view of various problems in onnx model conversion, it is recommended to use the latest pnnx tool to convert your model to ncnn

pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224]

详细参考文档 Detailed reference documentation https://github.com/pnnx/pnnx https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx#how-to-use-pnnx

nihui avatar Aug 05 '24 09:08 nihui