Tencent / TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
Other
4.41k stars 771 forks source link

error::op convert failed onnx:Expand #413

Closed gofugoo closed 4 years ago

gofugoo commented 4 years ago

onnx op version11 模型如下 yolov_simp.onnx.zip

python3 converter.py onnx2tnn weights/yolov_simp.onnx -o . -v v1.0 -optimize -align

---------- convert model, please wait a moment ----------

Converter ONNX to TNN Model

E/converter: int Onnx2TNN::TNNWriteProto() [File TNN-master/tools/onnx2tnn/src/core/onnx2tnn.cc][Line 310] error::op convert failed onnx:Expand Assertion failed: (0), function TNNWriteProto, file TNN-master/tools/onnx2tnn/src/core/onnx2tnn.cc, line 311.

Converter ONNX to TNN model failed!

1627180283 commented 4 years ago
image

模型里面含有 tnn 不支持的算子 Expand 和 ScatterND,可以将他们替换后再进行转换。 或者可以参考 tnn 提供的 yolo v5 :https://github.com/darrenyao87/tnn-models/tree/master/model/yolov5