ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

onnx转ncnn只生成单个文件且报错Unknown data type 1

Open zuieL opened this issue 2 years ago • 2 comments

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

D:\Project\BargainNet-Image-Harmonization-main\ncnn\build-vs2019\tools\onnx>onnx2ncnn.exe best.onnx best.param bestt.bin Unknown data type 1 Unknown data type 1 Unknown data type 1 Unknown data type 1 Unknown data type 1 Unknown data type 1 Unknown data type 1 Unknown data type 1

model | 模型 | モデル

  1. original model BargainNet https://github.com/bcmi/BargainNet-Image-Harmonization latest_net_G.pth

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

1.使用git克隆ncnn 2.下载cmake 3.26.0 protobuf 3.4.0 3.使用 onnx2ncnn image 每次只会生成放在后面的文件 be66287602a346974199d195ccefda3 换顺序后发现生成文件大小一样

zuieL avatar Apr 04 '23 12:04 zuieL

解决了吗 我也遇到这种问题

zjkhahah avatar Apr 09 '23 07:04 zjkhahah

针对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