Open stereomatchingkiss opened 2 years ago
针对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
error log
没有任何错误
ncnn版本
ncnn-20220420-windows-vs2019
model | 模型 | モデル
how to reproduce | 复现步骤 | 再現方法
转换的过程中没有输出任何错误讯息。
pytorch和ncnn的输出结果是不同的,以前5个为例
pytorch
c++(ncnn)
如果我输出的是mobileNetV2,结果是正确的
请问我是不是转换的过程中犯了什么错呢?
转换模型时的输出讯息
Exported model has been tested with ONNXRuntime, and the result looks good! Simplifying... Ok!
fuse_convolution_activation Conv_0 Mul_2 fuse_convolution_activation Conv_7 Relu_8 fuse_convolution_activation Conv_12 Relu_13 fuse_convolution_activation Conv_18 Relu_19 fuse_convolution_activation Conv_23 Relu_24 fuse_convolution_activation Conv_29 Relu_30 fuse_convolution_activation Conv_34 Relu_35 fuse_convolution_activation Conv_41 Relu_42 fuse_convolution_activation Conv_46 Relu_47 fuse_convolution_activation Conv_53 Mul_55 fuse_convolution_activation Conv_60 Mul_62 fuse_convolution_activation Conv_68 Mul_70 fuse_convolution_activation Conv_76 Mul_78 fuse_convolution_activation Conv_84 Mul_86 fuse_convolution_activation Conv_91 Relu_92 fuse_convolution_activation Conv_97 Mul_99 fuse_convolution_activation Conv_104 Relu_105 fuse_convolution_activation Conv_111 Mul_113 fuse_convolution_activation Conv_118 Relu_119 fuse_convolution_activation Conv_124 Mul_126 fuse_convolution_activation Conv_131 Relu_132 fuse_convolution_activation Conv_138 Mul_140 fuse_convolution_activation Conv_145 Relu_146 fuse_convolution_activation Conv_152 Mul_154 fuse_convolution_activation Conv_156 Mul_158 fuse_convolutiondepthwise_activation Conv_3 Relu_4 fuse_convolutiondepthwise_activation Conv_9 Relu_10 fuse_convolutiondepthwise_activation Conv_14 Relu_15 fuse_convolutiondepthwise_activation Conv_20 Relu_21 fuse_convolutiondepthwise_activation Conv_31 Relu_32 fuse_convolutiondepthwise_activation Conv_43 Relu_44 fuse_convolutiondepthwise_activation Conv_56 Mul_58 fuse_convolutiondepthwise_activation Conv_63 Mul_65 fuse_convolutiondepthwise_activation Conv_71 Mul_73 fuse_convolutiondepthwise_activation Conv_79 Mul_81 fuse_convolutiondepthwise_activation Conv_87 Mul_89 fuse_convolutiondepthwise_activation Conv_100 Mul_102 fuse_convolutiondepthwise_activation Conv_114 Mul_116 fuse_convolutiondepthwise_activation Conv_127 Mul_129 fuse_convolutiondepthwise_activation Conv_141 Mul_143 replace_convolution_with_innerproduct_after_global_pooling GlobalAveragePool_155 Conv_156 eliminate_flatten_after_innerproduct Conv_156 Flatten_159 Input layer input.1 without shape info, shape_inference skipped Input layer input.1 without shape info, estimate_memory_footprint skipped
python env
Python 3.8.5
argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 asttokens==2.0.5 attrs==21.4.0 backcall==0.2.0 black==22.1.0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 click==8.0.4 colorama==0.4.4 colour-checker-detection==0.1.3 Cython==0.29.28 -e git+https://github.com/ifzhang/ByteTrack@d742a3321c14a7412f024f2218142c7441c1b699#egg=cython_bbox&subdirectory=cython_bbox-0.1.3 debugpy==1.5.1 decorator==5.1.1 defusedxml==0.7.1 entrypoints==0.4 executing==0.8.2 flatbuffers==2.0 ipyfilechooser==0.6.0 ipykernel==6.9.1 ipython==8.0.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 jedi==0.18.1 Jinja2==3.0.3 jsonschema==4.4.0 jupyter-client==7.1.2 jupyter-core==4.9.2 jupyterlab-pygments==0.1.2 jupyterlab-widgets==1.0.2 lap==0.4.0 MarkupSafe==2.1.0 matplotlib-inline==0.1.3 mistune==0.8.4 mypy-extensions==0.4.3 nbclient==0.5.11 nbconvert==6.4.2 nbformat==5.1.3 nest-asyncio==1.5.4 notebook==6.4.8 numpy==1.22.2 onnxruntime-gpu==1.10.0 opencv-contrib-python-headless==4.5.5.62 packaging==21.3 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.9.0 pickleshare==0.7.5 platformdirs==2.5.1 prometheus-client==0.13.1 prompt-toolkit==3.0.28 protobuf==3.19.4 pure-eval==0.2.2 pycparser==2.21 pygame==2.1.2 Pygments==2.11.2 pyparsing==3.0.7 PyQt5==5.15.6 PyQt5-Qt5==5.15.2 PyQt5-sip==12.9.1 pyrsistent==0.18.1 python-dateutil==2.8.2 pywin32==303 pywinpty==2.0.2 pyzmq==22.3.0 scipy==1.8.0 Send2Trash==1.8.0 six==1.16.0 stack-data==0.2.0 terminado==0.13.1 testpath==0.6.0 thefuzz==0.19.0 tomli==2.0.1 tornado==6.1 traitlets==5.1.1 typing_extensions==4.1.1 wcwidth==0.2.5 webencodings==0.5.1 widgetsnbextension==3.5.2 wincertstore==0.2