Caffe Installation Issues Summary

Source: Internet
Author: User
Tags stack trace

Importerror:no module named Skimage

"Issue 1" for dual-card notebook only, through the *.run way to install Cuda, after the restart will be black screen appears unable to enter the desktop, only into the TTY

workaround : Use the *.deb method to install CUDA, do not need to install the Nvidia driver (CUDA-7.0 comes with the latest driver), but also do not need to shut down the LIGHTDM service into the TTY terminal to install.

Download the Deb offline package installation at Cuda official website Https://developer.nvidia.com/cuda-downloads.

"Issue 2"error: ' cudnn_pooling_average_count_include_padding ' is not declared in this scope (when installing CUDNN, make does not declare an error)

In file included from./include/caffe/util/device_alternate.hpp:40:0, from
                 ./include/caffe/common.hpp:19,
                 From./include/caffe/util/math_functions.hpp:9, from
                 src/caffe/util/im2col.cpp:6:
./include/caffe/util/ cudnn.hpp:In function ' void Caffe::cudnn::createpoolingdesc (cudnnpoolingstruct**, Caffe::P Oolingparameter_ Poolmethod, cudnnpoolingmode_t*, int, int, int, int, int, int) ':
./include/caffe/util/cudnn.hpp:117:13:error: ' Cudnn_pooling_average_count_include_padding ' is not declared in this scope
     *mode = Cudnn_pooling_average_count_ include_padding;
             ^
makefile:510:recipe for target '. BUILD_RELEASE/SRC/CAFFE/UTIL/IM2COL.O ' failed make
: * * * [. build_release/ SRC/CAFFE/UTIL/IM2COL.O] Error 1 Make
: * * * waiting for unfinished jobs ....
Workaround: The reason is that before using CUDNN version cudnn-6.5-linux-x64-r2-rc1.tgz too low, not suitable for the current Caffe version, CUDNN official website https://developer.nvidia.com/ CUDNN Register to download the current CUDNN version cudnn-6.5-linux-x64-v2.tgz.

"Question 3" Check Failed:status = = cudnn_status_success (6 vs. 0) Cudnn_status_arch_mismatch (make runtest check error)

F0510 12:25:55.208068 9923 cudnn_softmax_layer.cpp:19] Check failed:status = cudnn_status_success (6 vs. 0) CUDNN_STAT Us_arch_mismatch * * * Check failure Stack Trace: * * @ 0x7f13a97c7a0d Google::logmessage::fail () @ 0x7f13a 97C98C0 Google::logmessage::sendtolog () @ 0x7f13a97c75d2 Google::logmessage::flush () @ 0x7f13a97ca2de g     Oogle::logmessagefatal::~logmessagefatal () @ 0x7f13a63347a6 caffe::cudnnsoftmaxlayer<>::layersetup () @ 0x7f13a633afad caffe::softmaxwithlosslayer<>::layersetup () @ 0x47d375 caffe::gradientchecker< >::checkgradientexhaustive () @ 0x51e078 caffe::softmaxwithlosslayertest_testgradientunnormalized_test&lt           ; >::testbody () @ 0x74f923 testing::internal::handleexceptionsinmethodifsupported<> () @ 0x747aba Testing::test::run () @ 0x747c08 testing::testinfo::run () @ 0x747ce5 Testing::te     Stcase::run () @      0x748678 testing::internal::unittestimpl::runalltests () @ 0x748943 Testing::unittest::run () @ 0x44722a main @ 0x7f13a5654a40 (unknown) @ 0x44c409 _start makefile:465:recipe for Targe T ' runtest ' failed make: * * * [runtest] aborted (core dumped)
Workaround: The INSTALL.txt in the CUDNN installation package can be seen

Prerequisites

    CUDA 6.5 and a GPU of compute capability 3.0 or higher are required.

This means that the GPU is not accelerating enough, CUDNN only supports Cuda Capability 3.0 or more GPU acceleration, While my laptop graphics gt635m is 2.1 faster than the other 3.0 graphics cards, so choose not to enable CUDNN acceleration and annotate use_cudnn lines in Makefile.config.

"Question 4"/usr/bin/ld:cannot Find-lopenblas

Workaround :

In general, there are several reasons for this error: 1. The system lacks the corresponding library file; 2. version does not correspond; 3. Incorrect link to the library file; 4. library file path setting issue. Corresponding to the first second case, can be solved by downloading the installation lib, most of Ubuntu can be installed directly through Apt-get:

Apt-get Install Libxxx-dev

Generally encountered this problem the first time I will go to check whether the system has installed the LIB or whether the correct version has been selected, if still does not solve the problem, the cause of the error is not a link error is the library file path problem.  Navigate to the link file via the Find or locate command to see if the link file is correctly pointing to the Lib we want, and if not, modify it with the LN-SF */libxxx.so.x */libxxx.so directive. If the library file path raises a problem, you can go to the/ETC/LD.SO.CONF.D directory, modify any one of the Conf files, (you can build conf, to facilitate identification) The LIB directory is written in, and then in the terminal input ldconfig update cache.

Here, directly modify the makefile in Blas_include and Blas_lib

# BLAS choice:
# Atlas for Atlas (default)
# Mkl for MKL
# Open for Openblas
BLAS: = Open
# Custom (MK L/atlas/openblas) include and Lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
Blas_include: =/opt/openblas/include
blas_lib: =/opt/openblas/lib


"Issue 5"g++ version is too high

Error:kernel launches from templates is not allowed in System files 1 
 error detected in the compilation of "/tmp/tmp Xft_00005657_00000000-10_math_functions.cpp4.ii ".

Workaround :

g++ version is too high in Ubuntu14.04, Ubuntu15.04 is normal

sudo apt-get install gcc-4.6 g++-4.6 gcc-4.6-multilib g++-4.6-multilib
sudo update-alternatives--remove-all gcc
sudo update-alternatives--remove-all g++
sudo update-alternatives--install/usr/bin/gcc gcc/usr/bin/ gcc-4.6
sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.6
sudo update-alternatives-- INSTALL/USR/BIN/CC cc/usr/bin/gcc
-sudo update-alternatives--set cc/usr/bin/gcc
sudo update-alternatives- -install/usr/bin/c++ C + +/usr/bin/g++
sudo update-alternatives--set C + +/usr/bin/g++
sudo Update-alternatives--config gcc
sudo update-alternatives--config g++

Modify Makefile, specify g++ version

CXX: =/usr/bin/g++-4.6

"Question 6"
./create_mnist.sh:16:./create_mnist.sh:build/examples/mnist/convert_mnist_data.bin:not found


Workaround :

The new Caffe will need to be executed from the root directory, or you may encounter this error

The default switch to the working directory Home/username/caffe-master to test whether the Caffe is working properly

$ sh data/mnist/get_mnist.sh  % data preprocessing
$ sh examples/mnist/create_mnist.sh% generated mnist-train-lmdb and Mnist-train-lmdb folder, which contains Lmdb format data set
$ sh examples/mnist/train_lenet.sh% Training mnist

"Question 7"

The following error occurred while using Pycaffe to visualize

Importerror:no module named Skimage
Workaround

After installing Cython, and then Scikit-image.

Pip Install Cython
pip install Scikit-image


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.