Caffe Debugging Ubuntu1404+eclipse__caffe

Source: Internet
Author: User

First make sure that you caffe compile successfully, and makefile.config the Debug:=1 line to uncomment, my Caffe root directory is caffe-master. You can also compile caffe in Eclipse, I'm going to compile the Caffe first and then debug in eclipse


1, Eclipse download URL http://www.eclipse.org/downloads/

Download the Eclipse IDE for C + +. (Note that you can download the C + + version of Eclipse directly in the link without downloading the JRE, etc installation packages)

Download after completion of the download directory: TAR-ZXVF eclipse-cpp-mars-r-linux-gtk-x86_64.tar.gz

Enter the extract directory Eclipse and open the Eclipse software.


2. Import Caffe Makefile Project to eclipse (due to the English version, the following description also in English, provincial translation, convenient for everyone to debug)

(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 ..., choose c + + Application


(5) Fill launch configurationproperties


· Arguments:
Fill Train–solver=examples/mnist/lenet_solver.prototxt
and change working directory out of default To/home/user/caffe-workspace/caffe-master (change to your own directory)


(6) Now, can use debug Caffe code:run-> debug:



Note: Debugging techniques in Eclipse you can Baidu, you can open in eclipse in the src file in the layer layer of the original function, in front of each line set breakpoints to debug. Common command F5 into function internal F6 step run (not inside the function) F8 run to the next breakpoint



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.