onnx转ncnn只生成单个文件且报错Unknown data type 1
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 | 模型 | モデル
- 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
每次只会生成放在后面的文件
换顺序后发现生成文件大小一样
解决了吗 我也遇到这种问题
针对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