Caffe Beginner First: Detailed procedure for installing Caffe (CPU) +python on Ubuntu14.04 (pro-Test success, 20180524 update)

Source: Internet
Author: User

Objective:

Recently in learning deep learning, the first thing to solve is the open source framework of the environment installed. has been studying Google's TensorFlow open source framework, the recent experiment needs to compare with others ' algorithms, the download of other people's code is caffe, so want to build a good caffe environment to run other people's code. There's been a lot of detours in the middle, Started is into the Ubuntu16.04 pit, many tutorials are said that the GCC version does not match, need to downgrade, I also tried to find a lot of pits, in addition, is the installation of MATLAB version of the Caffe and installed GPU version of the Caffe, have experienced a lot of twists and turns, this groping around about half a month. Finally, it is found that Ubuntu14.04 is most suitable for installing Caffe environment.

So, I think since GPU version or MATLAB version of the Caffe environment configuration a lot of pits, why not first from the simplest version of the Cpu+python configuration? After facing the Caffe framework familiar with or need to use Matcaffe, then to explore the GPU or MATLAB version of the Caffe configuration. This is the purpose of my blog, first write a configuration Caffe CPU only version of the blog tutorial, I hope that beginners no longer configure the Caffe environment Tanhusebian. Don't talk more, start our tutorial!

First of all, to say about this tutorial is applicable to the computer system environment, I installed the notebook win7+ubuntu14.04 dual system. As for installing the dual system, you can refer to the online blog: https://www.jianshu.com/p/dfd9436956b9

I downloaded the Ubuntu14.04 is the Kyliin version, here is attached download link, directly copied to the Thunderbolt can download fast: http://cdimage.ubuntu.com/ubuntukylin/releases/14.04/ Release/ubuntukylin-14.04.5-desktop-amd64.iso

As for the hardware, because the installation is the CPU only version of the Caffe, I think the current computer CPU is basically feasible, the memory of what is not too high requirements.

Pro-Test Tutorials:

At this point, students you should have installed the Ubuntu14.04, right, then I continue to teach you.

Note that after the Ubuntu14.04 is loaded, do not change the source, the system may prompt you to upgrade to Ubuntu16.04, you choose not to upgrade.

At this point, open the terminal

STEP1: Enter the following code:

sudo apt-get update

STEP2: Install caffe necessary dependencies, remember to install the dependencies for each step:

sudo apt-get install gitsudo apt-get install Libprotobuf-dev libleveldb-dev libsnappy-dev Libopencv-dev Libhdf5-serial-dev protobuf-compilersudo apt-get Install build-essentialsudo apt-get Install--no-install-recommends Libboost-all-devsudo apt-get Install libatlas-base-devsudo apt-get Install--no-install-recommends Libboost-all-devsudo apt-get Install Libgflags-dev Libgoogle-glog-dev Liblmdb-dev

STEP3: The official website pulls the source code:

Cdgit Clone Https://github.com/BVLC/caffe.git

Note The third step if the terminal download is too slow, the URL can be

Https://github.com/BVLC/caffe.git

Copy to the browser address bar, then manually click the download Zip package, "Caffe-master.zip", then extract to the home folder, the extracted folder renamed to "Caffe".

STEP4: The second part of the installation depends on:

sudo apt-get install Libblas-dev liblapack-dev libatlas-base-dev gfortran python-numpysudo apt-get Install Python-pipsudo apt-get Install python-numpy python-scipy python-matplotlib python-sklearn sudo apt-get install Python-skimage python-h5py python-protobuf python-leveldb sudo apt-get install python-networkx python-nose Python-pandas sudo apt-get install python-gflags cython ipython sudo apt-get update

STEP5: Modify the configuration file:

CD CAFFECP Makefile.config.example Makefile.configgedit makefile.config

Modify only one place, and the "cpu_only" option is turned on.

STEP6: Compiling and testing:

Make All-j4make test-j4make runtest-j4make pycaffe-j4make Distribute

When testing, enter the following code:

Cd/home/dylan/caffe/pythonpythonimport Caffe

Where "Dylan" is my UBUTNU user name, change to your own can, if not wrong, it means Caffe Cpu+python version of the Environment installation success, congratulations!

Subsequent:

This tutorial pro-test success, if you have questions welcome message discussion.

This tutorial installs the simplest Caffe (CPU) +python Environment for beginners only

The blogger will then write the following Caffe Beginners Four blog, please look forward to:

Caffe Beginner Part II : Caffe (CPU) +matlab Tutorial

Caffe Beginner Part III : Caffe (GPU) +python Tutorial

Caffe Beginner Fourth : Caffe (GPU) +matlab Tutorial

Reference blog:

http://blog.csdn.net/wopawn/article/details/52302164

Https://www.jianshu.com/p/dfd9436956b9

Https://www.cnblogs.com/xuanxufeng/p/6016945.html

52156552

  

Caffe Beginner First: Detailed procedure for installing Caffe (CPU) +python on Ubuntu14.04 (pro-Test success, 20180524 update)

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.