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.
1. 环境(environment)
RunTime DEVICE: CPU
2. Github版本
commit(optional):
3. 编译方式(compile method) CMake完整编译参数(full cmake arguments)
4. 编译日志(build log)
5. 详细描述bug 情况 (Describe the bug) 1.使用在线方式(https://convertmodel.com/)把onnx模型转换成tnn模型推理报错如下“运行日志”
2.使用docker本地转换会报错如下: root@computer:/opt/TNN/tools/convert2tnn# python3 converter.py onnx2tnn /workspace/yolov5s-sim.onnx -o . -v v1.0 -optimize -align ---------- convert model, please wait a moment ----------
Converter ONNX to TNN Model...
Converter ONNX to TNN check_onnx_dim...
Converter ONNX to TNN check_onnx_dim...
Converter ONNX to TNN model failed!
root@computer:/opt/TNN/tools/convert2tnn#
3.附件 yolov5s-sim.zip yolov5s-sim.opt.tnn.zip
yolov5s-sim.zip是onnx模型 yolov5s-sim.opt.tnn.zip是在线转换的tnn模型
6. 运行日志(runtime log) root@computer:~/project/TNN/examples/linux/x86/build_linux_native$ ./demo_x86_objectdetectoryolov5 -p ../../../../model/yolov5/yolov5s-sim.opt.tnnproto -m ../../../../model/yolov5/yolov5s-sim.opt.tnnmodel Please choose the source you want to detect: Face-detector is about to start, and the picrture is ../../../assets/004545.jpg E/tnn: InferOutputShape [File /home/lu/project/TNN/source/tnn/layer/permute_layer.cc][Line 47] Permute param got wrong size. E/tnn: InferOutputShape [File /home/lu/project/TNN/source/tnn/layer/permute_layer.cc][Line 47] Permute param got wrong size. E/tnn: InferOutputShape [File /home/lu/project/TNN/source/tnn/layer/permute_layer.cc][Line 47] Permute param got wrong size. E/tnn: InferOutputShape [File /home/lu/project/TNN/source/tnn/layer/permute_layer.cc][Line 47] Permute param got wrong size. E/tnn: Init [File /home/lu/project/TNN/source/tnn/layer/base_layer.cc][Line 57] InferOutputShape failed E/tnn: InitLayers [File /home/lu/project/TNN/source/tnn/core/default_network.cc][Line 318] Error Init layer Transpose_260 (err: 4096 or 0x1000) Predictor Initing failed, please check the option parameters Segmentation fault (core dumped)
7. 截图(Screenshots)