General:
cmake >= 3.1
gcc >= 4.8
NDK >= r14b
Model conversion:
python >= 3.5
onnxruntime >= 1.1
onnx-simplifier >= 0.2.4
protobuf >= 3.0
- We support the popular machine-learning training frameworks through intermediate onnx format, and the open source community provides handful tools for converting these frameworks to onnx
- tensorflow2onnx: typical usage: python -m tf2onnx.convert --inputs-as-nchw [input tensor]: 0 --graphdef [input file].pb --inputs [input tensor]: 0 --outputs [output tensor]: 0 --opset 11 --output [output file].onnx
- caffe2onnx
- Mxnet: export onnx model
- Pytorch: EXPORTING A MODEL FROM PYTORCH TO ONNX
- Refer to Model Test Document
- Modify [blob_dump_utils.h] (source/tnn/utils/blob_dump_utils.h)
- #define DUMP_INPUT_BLOB 0-> #define DUMP_INPUT_BLOB 1, get the input of each layer
- #define DUMP_OUTPUT_BLOB 0-> #define DUMP_OUTPUT_BLOB 1, get the output of each layer
- Only for debugging
- Please refer to profiling document performance test
// Homebrew installation under mac
//https://zhuanlan.zhihu.com/p/59805070
//https://brew.sh/index_zh-cn
// Replace the installation script of the domestic mirror