Some problems in the Caffe configuration _caffe

Source: Internet
Author: User
Tags git clone

Always wanted to use DL for their current research in Image retrieval, in fact, the boy in the previous blog deep Learning for content-based Image retrieval on the use of DL to do a search paper also did some research. As you can see, the DL is now very hot, but it does not seem to have much use for image retrieval. This sky just to sneak in, in Ubuntu12.04 Caffe, success, can only say configuration up really very egg pain. The following is their own in the process of configuring some of the problems, the configuration of their own specially made notes, easy to check back.

1, Cuda with the graphics driver, after the installation of the graphics interface resolution blurred, Nvidia graphics configuration is to appear:

You don't appear to be using the NVIDIA X driver. Please edit your x configuration file (just run nvidia-xconfig as root) and restart the X server

Mainly because the installed video card is not activated:

I was also facing the same problem. Now this is asked it, I wanted to fix >in my computer as. So we are how to do it.

Edit:sudo Apt-get Install Nvidia-current

sudo nvidia-xconfig. This would just create the file/etc/x11/xorg.conf. Next do

sudo software-properties-gtk

The answer link is installed on the above, reboot, complete activation.

2,/include/caffe/common.hpp:5:27: Fatal error: gflags/gflags.h: No file or directory compilation interrupt. Make: * * * * [. BUILD_RELEASE/SRC/CAFFE/COMMON.O] Error. Can be seen with gflags related, presumably is gflags not installed, so follow the tutorial to install the following:

# install Glog/gflags/lmdb
# glog
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure make
&& make install
# gflags
wget https:// Github.com/schuhschuh/gflags/archive/master.zip
Unzip master.zip
CD gflags-master
mkdir Build & & CD Build
export cxxflags= "-fpic" && cmake ... && make verbose=1 make
&& make instal L
# Lmdb
git clone https://gitorious.org//mdb/mdb.git
cd Mdb/libraries/liblmdb make
&& Make install 

3. MKL error when compiling Caffe with make all:./include/caffe/util/mkl_alternate.hpp:6:17: Fatal error: mkl.h: No file or directory compilation interrupted. This is mainly because the environment settings for MKL and Cuda are not set up well. It is also best to choose the default path when installing MKL:

/opt/intel/lib/intel64
/opt/intel/mkl/lib/intel64

4, appears:/usr/bin/ld:cannot find-lboost_system collect2:ld return 1make: * * * * * * * build_release/lib/libcaffe.so] error. This need to install Libboost-dev, run the following command to complete according to:

sudo apt-get install Libboost-all-dev

Install Caffe and test. Switch to the download folder for Caffe, and then execute:

$ CP Makefile.config.example Makefile.config

It is important to modify the newly generated Makefile.config file and modify the "BLAS: = Mkl".

$ make clean
$ make all
$ make test
$ make runtest

Create a new cuda.conf and edit it:

$ sudo touch cuda.conf
$ sudo vim cuda.conf

Add in the new cuda.conf:

/usr/local/cuda/lib64
/lib

Completes the link operation of the Lib file, executes:

$ sudo ldconfig-v 

5, when./create_mnist.sh, Fault:convert_mnist_data.bin:not found

This problem, in the Caffe GitHub someone put forward issue, link portal, according to the answer, for Caffe, must be in the Caffe root directory, so the root directory run script it.

Finally, if the GPU is not used, modify the GPU to the CPU on the last line of Examples/mnist/lenet_solver.prototxt. Caffe Python Interface installation

1. If there is no Pip, install the PIP first. To enter the Caffe Python directory, install the required dependencies:

sudo pip install-r requirement.txt 

Failed with Requirements.txt, anaconda install sudo pip install-r/path/to/caffe/python/requirements.txt When you execute the above command, An error will result in the inability to fully install all the required packages. Anaconda packages can be installed in accordance with official recommendations. In the Anaconda website download. sh file, execute, and finally add Bin directory to environment variable can (when the installation will ask you whether to add).

Note: The library installed by Anaconda is not in the Python library directory.

2, Error: libm.so.6:glibc_2.15 not found, required by libopencv ... Rename libm.so.6 and libm.so to something else, such as:

sudo mv libm.so.6 libm.so.6.backup
sudo mv libm.so libm.so.backup

3, you need to install Ipython and Ipython qtconsole. After installation, you can test with the following script:

Import sys
sys.path.append ('/home/yong/anaconda/lib/python2.7/site-packages ')
sys.path.append ('/usr/lib /python2.7/dist-packages ')

import numpy as NP
import Matplotlib.pyplot as plt
%matplotlib inline

# Make sure that Caffe's on the Python path:
caffe_root = '. /' # This file was expected to being in  {caffe_root}/examples

sys.path.insert (0, caffe_root + ' python ')

import CAF Fe

plt.rcparams[' figure.figsize '] = (a)
plt.rcparams[' image.interpolation '] = ' nearest '
plt.rcparams[' image.cmap '] = ' gray '

Reference:

Caffe Official website

Ubuntu12.04 with CPU compilation using Caffe (not fully installed)

Caffe + Ubuntu 14.04 + CUDA 6.5 Novice Installation Configuration Guide

Caffe Configuration Process

DIY Deep Learning for vision:a hands-on Tutorial with Caffe From:http://yongyuan.name/blog/problems-when-configing-caff E.html

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.