ncnn编译使用

安装

git clone https://github.com/Tencent/ncnn
cd ncnn
mkdir build
cd build
cmake ..
make -j

编译报错
onnx.proto:383:5: Expected “required”, “optional”, or “repeated”.
onnx.proto:383:17: Missing field number.
onnx.proto:402:3: Expected “required”, “optional”, or “repeated”.
onnx.proto:402:15: Missing field number.
make[2]: *** [tools/onnx/onnx.pb.cc] 错误 1
make[1]: *** [tools/onnx/CMakeFiles/onnx2ncnn.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务…
解决方法:
disable onnx2ncnn tool by commenting it out in tools/CMakeLists.txt
使用
将caffe模型转化成ncnn模型

cd ncnn/build/tools/caffe
./caffe2ncnn deploy.prototxt bvlc_alexnet.caffemodel alexnet/alexnet.param alexnet.bin

编译example
uncomment add_subdirectory(examples)
in CMakeLists.txt

你可能感兴趣的:(ncnn编译使用)