Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.58k stars 4.18k forks source link

不能正确解析onnx: conv2d 为 conv_dw #1579

Closed cvwoker closed 4 years ago

cvwoker commented 4 years ago

如图,这种情况怎么改

onnx_ncnn

nihui commented 4 years ago

请上传有问题的onnx以便分析

cvwoker commented 4 years ago

erfnet_sim.zip

nihui commented 4 years ago

这个似乎是 netron 显示的问题,netron 没有正确读取非正方形的 kernel shape 但是 ncnn 的 parma bin 内容是正常的

cvwoker commented 4 years ago

谢谢

nihui commented 3 months 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