Tencent / ncnn

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

find_blob_index_by_name 393 failed #1653

Open PointCloudNiphon opened 4 years ago

PointCloudNiphon commented 4 years ago

https://github.com/Tencent/ncnn/blob/e16b338b136c94805bc7d0ef3756f2dc4bfa3408/docs/how-to-use-and-FAQ/use-ncnn-with-pytorch-or-onnx.md 测试环境: • OS: win10 • pytorch==1.4.0 • 编译工具:x64 Native Tools Command Prompt for VS 2019 注: • 上述教程中的resnet可以正常运行通过,可以通过修改ncnn/example/shufflenetv2.cpp正常调用生成bin、param文件 • 使用https://github.com/ultralytics/yolov3模型: • ( .pt) ->( .onnx) -> onnxsim -> ( .onnx) -> onnx2ncnn -> ( .bin, .param) ->

find_blob_index_by_name 306 failed

find_blob_index_by_name 310 failed

find_blob_index_by_name 317 failed

find_blob_index_by_name 344 failed

find_blob_index_by_name 348 failed

find_blob_index_by_name 355 failed

find_blob_index_by_name 382 failed

find_blob_index_by_name 386 failed

find_blob_index_by_name 393 failed

read layer params failed -1

nihui commented 4 years ago

please provide the onnx model file

PointCloudNiphon commented 4 years ago

please provide the onnx model file thanks for your attention!!! 链接:https://pan.baidu.com/s/18lOuh6iOFLTwKgCba2h4-Q 提取码:xx92 复制这段内容后打开百度网盘手机App,操作更方便哦

PointCloudNiphon commented 4 years ago

please provide the onnx model file thanks for your attention!!!@nihui this time the size of the model is 33m...

链接:https://pan.baidu.com/s/1DXMYPjZqIw44IXLp7Xk5ng 提取码:5elr 复制这段内容后打开百度网盘手机App,操作更方便哦

nihui commented 4 years ago

更新最新的代码应该可以转换,但是我看模型文件最后有两大坨应该是后处理操作,需要导出onnx的时候去掉这些,在外面实现

PointCloudNiphon commented 4 years ago

@nihui thanks for your answer,I will have a try...

nihui commented 1 month 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