ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

基于mobilenet_v3_small修改后的模型 ONNX推理结果与NCNN推理结果不一致

Open FlyingAle opened this issue 2 years ago • 2 comments

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

基于mobilenet_v3_small修改后的模型 ONNX推理结果与NCNN推理结果不一致 测试代码,测试模型与测试用资源均在附件中

context | 编译/运行环境 | バックグラウンド

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

  1. 运行onnxProcess.py 处理结果会输出到result/outputData_17.txt 文件中 2.运行test_ncnn.py 处理结果会输出到result/outputData_ncnn_17.txt 文件中 3.经过对比 两个输出结果不一致

more | 其他 | その他

FlyingAle avatar Nov 06 '23 03:11 FlyingAle

test.zip

FlyingAle avatar Nov 06 '23 03:11 FlyingAle

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