一.安装caffe并且编译参考我的另一篇文章
https://blog.csdn.net/generalsong/article/details/84843640
ubuntu16.04安装配置caffe(GPU&cpu),pycaffe3.5!
git clone https://github.com/BVLC/caffe.git
二.qt 中配置caffe
- 运行Qt Creator ->file->open file or project ->载入 caffe根目录下的 CMakeLists.txt
- 如下图,点击Configure Project即可
- 点击左边任务栏,
Projects
选项,进入以下界面, - 将
Edit build configuration
改为Debug
模式 - 修改Build directory路径,可以自己在caffe工程中建一个文件夹QtBuild
点击左下角的锤子或者ctrl+b ,进行项目编译,可以在底部Compile Output选项中查看编译进度,编译成功的界面如下;
- 点击左边任务栏中的Projects选项,进入以下界面;
- Run configuration 选择caffe.bin
- 在
Command line arguments
中填入:train --solver=examples/mnist/lenet_solver.prototxt
- 在
Working directory
中填入caffe根目录:/home/archer/Downloads/caffepy3_master
- 点击左下角
小电脑
图标,build
栏目下选择Debug
,run
栏目下选择Caffe.bin
配置完毕,点击三角键或者ctrl r来运行caffe,如下图是我用mnist运行成功的截图)
接下来既可以设置断点进行调试了,caffe 是从根目录下的tool/caffe.cpp开始运行的.