caffe调试 ubuntu1404+eclipse
首先确保你caffe编译成功,而且makefile.config中将DEBUG:=1那一行取消注释,我的caffe根目录为 caffe-master。你也可以在Eclipse中编译caffe,我是先编译好caffe,然后进入Eclipse中调试
1、eclipse 下载网址http://www.eclipse.org/downloads/
下载eclipse IDE for c/c++.(注意无需下载jre等安装包,直接下载链接中的 c++版的Eclipse即可)
下载完成后进入下载目录:tar -zxvf eclipse-cpp-mars-R-linux-gtk-x86_64.tar.gz
进入解压目录eclipse,打开 eclipse 软件。
2.导入caffe makefile工程到eclipse (由于是英文版,下面描述也用英文,省的翻译,方便大家调试)
(1)File→New→Project→C/C++ →Makefile Project with Existing Code.
(2)Create a new Makefile Project from existing code
Projectname:
caffe-master
Existing code location
/home/user/caffe-workspace/caffe-master
Language:
choose C and C++
Toolchain:
choose Linux GCC
(3)Then click on caffe-master in Project Explorer (set Window→Open Perspective → C/C++).
(4)Now go File → Properties → Run/Debug settings.Click New.., and choose C/C++ application
(5)Fill launch configurationproperties
· Arguments:
fill train –solver=examples/mnist/lenet_solver.prototxt
and change working directory from default to /home/user/caffe-workspace/caffe-master(change to your own directory)
(6)Now you can use debug caffe code: Run-> Debug:
注:Eclipse中调试技巧大家可以百度,可以在eclipse中打开src文件中layer层的原函数,在每行前面设置断点进行调试。常用命令 F5进入函数内部 F6单步运行(不进入函数内部)F8运行到下一断点处
更多推荐
所有评论(0)