Caffe Makefile.config Anaconda2 Python3 all problems a solution

Source: Internet
Author: User

I only changed two numbers, and then, all errors, missing, two days toss, all is poor toss.

The thing is, other than the official version, other tutorials without the official doc are bullying.

Some people say that the official said Anaconda+python very simple good configuration, why, I so many errors, and finally have to use PIP, because the official configuration document is Makefile.config inside is anaconda2+ python2.7, if you install the above version, then you are very simple, but the old version is destined to be eliminated, you see now who use Windows XP?

No tutorials, or not the latest for anaconda3+python3.6, do?

I tell you, configure the time just follow your anaconda installation package inside the path, the original changed the path for ANACONDA2, all the front, all versions, all to you, you just change the example of my python in anaconda

Then I need to change the python2.7 in config to 3.6m. In short, since you used Anaconda, you have to tell your Caffe exactly where to find my library, instead of blind change, changed the error, go everywhere to search (is me) I saw so many doc, the only piece of free play, I gave myself to the pit (indeed look at the face, Maybe a little more in the mirror lately)

Finally attached to my config, this piece of the ultimate tutorial, is based on you read the official website of the tutorial, the configuration of the last config. Another reminder, GPU CUDNN require your graphics card acceleration above 3, my machine is not, and bantu16.04 request to install cuda8.0, I installed 9.1. I was obviously curious and foolish, tempted on the verge of making mistakes, trying the latest version, and waiting for me to reload the cuda8, then the entire GPU version.

Please note that CUDNN and cuda are not necessarily together, the specific care network, the configuration of the time said three kinds of situations.

In addition, if installed CUDNN then please pay attention to the time difference, the opposite working hours very punctual, we can only in the morning and evening visit wait and see. All other time is maintenance. I was surprised, the operation can not afford to do???

## Refer to http://caffe.berkeleyvision.org/installation.html#contributions simplifying and improving our build system is welcome!#cuDNN Acceleration Switch (uncomment to build with CuDNN).#USE_CUDNN: = 1#cpu-only switch (uncomment to build without GPU support).Cpu_only: = 1#Uncomment to disable IO dependencies and corresponding data layers#USE_OPENCV: = 0#use_leveldb: = 0#Use_lmdb: = 0#uncomment to allow Mdb_nolock when reading LMDB files (only if necessary)#You should no set this flag if you'll be a reading Lmdbs with any#possibility of simultaneous read and write#Allow_lmdb_nolock: = 1#Uncomment if you ' re using OpenCV 3#opencv_version: = 3#to customize your choice of compiler, uncomment and set the following.#n.b. The default for Linux are g++ and the default for OSX is clang++#custom_cxx: = g++#CUDA directory contains Bin/and lib/directories that we need.Cuda_dir: =/usr/local/Cuda#On Ubuntu 14.04, if Cuda Tools is installed via#"sudo apt-get install Nvidia-cuda-toolkit" then use this instead:#cuda_dir: =/usr#CUDA Architecture setting:going with all of them.#for CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.#for CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.#for CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.Cuda_arch: =-gencode arch=compute_20,code=sm_20-gencode arch=compute_20,code=sm_21-gencode arch=compute_30,code=sm_30-gencode arch=compute_35,code=sm_35-gencode arch=compute_50,code=sm_50-gencode arch=compute_52,code=sm_52-gencode arch=compute_60,code=sm_60-gencode arch=compute_61,code=sm_61-gencode arch=compute_61,code=compute_61#BLAS Choice:#Atlas for Atlas (default)#Mkl for Mkl#Open for OpenblasBLAS: =Atlas#Custom (Mkl/atlas/openblas) include and Lib directories.#Leave commented to accept the defaults for your choice of BLAS#(which should work)!#blas_include: =/path/to/your/blas#blas_lib: =/path/to/your/blas#Homebrew puts Openblas in a directory that's not on the standard search path#blas_include: = $ (Shell brew--prefix openblas)/include#blas_lib: = $ (Shell brew--prefix openblas)/lib#This is required only if you'll compile the Matlab interface.#MATLAB directory should contain the MEX binary In/bin.#Matlab_dir: =/usr/local#Matlab_dir: =/applications/matlab_r2012b.app#Note:this is required only if you'll compile the Python interface.#We need to is able to find Python.h and numpy/arrayobject.h.#python_include: =/usr/include/python3.5 \/usr/lib/python3.6/dist-packages/numpy/core/include#Anaconda Python distribution is quite popular. Include Path:#Verify Anaconda location, sometimes it's in root.Anaconda_home: = $ (HOME)/Anaconda3 python_include:= $ (anaconda_home)/include $ (anaconda_home)/include/python3.6m $ (anaconda_home)/lib/python3.6/site-packages/numpy/core/include#uncomment to use Python 3 (default is Python 2) #python_libraries: = Boost_python3 python3.5m #python_include: =/usr/include/python3.5m \  #/usr/lib/python3.5/dist-packages/numpy/core/include#We need to is able to find libpythonx.x.so or. dylib.#python_lib: =/usr/libPython_lib:= $ (anaconda_home)/Lib#Homebrew installs NumPy in a non standard path (keg only)#Python_include + = $ (dir $ (Shell python-c ' import numpy.core; print (numpy.core.__file__) '))/include#Python_lib + = $ (Shell brew--prefix numpy)/lib#uncomment to support layers written in Python (would link against Python libs)With_python_layer: = 1#Whatever Else you find your need goes here.Include_dirs: = $ (python_include)/usr/local/include#include_dirs: = $ (python_include)/usr/local/include/usr/include/hdf5/serial/Library_dirs: = $ (python_lib)/usr/local/lib/usr/Lib#If Homebrew is installed @ a non standard location (for example your home directory) and the use of it for general Depe Ndencies#Include_dirs + = $ (Shell brew--prefix)/include#Library_dirs + = $ (Shell brew--prefix)/lib#NCCL acceleration switch (uncomment to build with NCCL)#HTTPS://GITHUB.COM/NVIDIA/NCCL (last tested version:v1.2.3-1+cuda8.0)#USE_NCCL: = 1#Uncomment to the use of ' Pkg-config ' to specify OpenCV library paths.#(usually not necessary--OpenCV libraries is normally installed in one of the above $LIBRARY _dirs.)#use_pkg_config: = 1#n.b. Both build and distribute dirs is cleared on ' make clean 'Build_dir: =Builddistribute_dir:=Distribute#Uncomment for debugging. Does not work on OS X due to https://github.com/BVLC/caffe/issues/171#DEBUG: = 1#The ID of the GPU that's ' make runtest ' would use a to run unit tests.Test_gpuid: =0#Enable pretty build (comment to see full commands)Q? = @

Finally, if there is a question welcome message, I am still more familiar with, you later I forgot.

In addition, if the fire, ask too much, I should be high cold (think too much)

Caffe Makefile.config Anaconda2 Python3 all problems a solution

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.