Ubuntu 16.04 Debug Caffe Deep Learning Framework

Source: Internet
Author: User

About the installation of Caffe Baidu, tutorials flying around, but a little mention, dual-system dual-card (notebook) in the Ubuntu installation Nvidia graphics graphics interface may hang up, the problem in Ubuntu 16.04 get a preliminary solution, there is a notebook installed on the Internet Caffe have mentioned, But I can't find it.

Debug editor for Virtual Studio code Microsoft Production Editor. It's very useful,

This is the first of the plugins I installed is more important, you can debug caffe using GDB. Enter Caffe with folder modification

Make.config in #debug: = 1 #号去掉 then save and recompile.

Take the debug examples/cpp_classification as an example.

Give me the Launch.json configuration file

{    "Version": "0.2.0",    "Configurations": [                {            "Name": "(gdb) Launch",            "Type": "cppdbg",            "Request": "Launch",            "Args": ["Models/bvlc_reference_caffenet/deploy.prototxt",                "Models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel",                "Data/ilsvrc12/imagenet_mean.binaryproto",                "Data/ilsvrc12/synset_words.txt",                "Examples/images/cat.jpg"],            "Program": "${workspaceroot}/build/examples/cpp_classification/classification.bin",            "Stopatentry":false,            "CWD": "/home/kellygod/caffe/",            "Environment": [],            "Externalconsole":true,            "Mimode": "GdB",            "Setupcommands": [                {                    "description": "Enable pretty-printing for GdB",                    "Text": "-enable-pretty-printing",                    "Ignorefailures":true                }            ]        }    ]}

CWD is the root directory for the run to designate him as the Caffe root directory for easy debugging.

Program is the executable path and caffe is generated by default to {Caffe_root}/build/xxx

Args is the startup parameter, why do I write this? Because this is what example's Readme says, run the demo.

Then you can do it like visual Studio. F9 to the text below the breakpoint, one-step debugging watch the variable state what, of course, Daniel can also directly use GDB command line debugging.

Has entered the breakpoint, you can trace the function ...

End

Ubuntu 16.04 Debug Caffe Deep Learning Framework

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.