Installing Caffe on Ubuntu 16.04
In this post, I would like to show how to build Caffe a deep learning framework, developed by Berkeley AI Research.
System configuration: Ubuntu 16.04, CPU AMD A4 processor.
Why I am writing this post is, when I tried to build Caffe I found few issues. So, I tried many things and finally end up with the following steps which helps in building Caffe on my system.
Let's begin, we will first create folder named 'deep-learning'
$ mkdir deep-learning
$ cd deep-learning
Installing the dependencies:
$ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
$ sudo apt-get install --no-install-recommends libboost-all-dev
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install the python-dev
$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
Compile and Install Caffe
The Caffe repository is hosted on GitHub. To clone the repository enter the below command in the terminal.
git clone http://github.com/BVLC/caffe.git
The Makefile.config.example contains the template for the configuration file. We’ll use it to write the Makefile.config configuration file.
cp Makefile.config.example Makefile.config
In the Makefile.config the file we need to set options if we want to use a CPU or a GPU. Open your editor and uncomment the line CPU_ONLY := 1 (probably, online number 8) as shown below.
Change #CPU_ONLY := 1 to CPU_ONLY := 1
**After the build command you’ll see something like this
And finally after runtest you’ll see this
To add PYTHON support, run the below commands in the terminal.
echo export PYTHONPATH=~/deep-learning/caffe/python:$PYTHONPATH >> ~/.bashrc
Now it’s time for the test:
Thank you, Hope this helped you ...