Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR)/The Berkeley Vision and Learning Center (BVLC) and community contributors. Check out the project site for all the details like: Installation instructions http://caffe.berkeleyvision.org/installation.html
# CPU-only switch (uncomment to build without GPU support). -# CPU_ONLY := 1 +CPU_ONLY := 1
# To customize your choice of compiler, uncomment and set the following. # N.B. the default for Linux is g++ and the default for OSX is clang++ @@ -31,7 +31,7 @@ CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ # atlas for ATLAS (default) # mkl for MKL # open for OpenBlas -BLAS := atlas +BLAS := open # Custom (MKL/ATLAS/OpenBLAS) include and lib directories. # Leave commented to accept the defaults for your choice of BLAS # (which should work)! @@ -41,12 +41,13 @@ BLAS := atlas # This is required only if you will compile the matlab interface. # MATLAB directory should contain the mex binary in /bin. # MATLAB_DIR := /usr/local -# MATLAB_DIR := /Applications/MATLAB_R2012b.app +MATLAB_DIR := /Applications/MATLAB_R2014b.app
# NOTE: this is required only if you will compile the python interface. # We need to be able to find Python.h and numpy/arrayobject.h. -PYTHON_INCLUDE := /usr/include/python2.7 \ - /usr/lib/python2.7/dist-packages/numpy/core/include +PYTHON_INCLUDE := /usr/local/include/python2.7 \ + /usr/local/lib/python2.7/dist-packages/numpy/core/include \ + /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Headers # Anaconda Python distribution is quite popular. Include path: # Verify anaconda location, sometimes it's in root. # ANACONDA_HOME := $(HOME)/anaconda @@ -55,12 +56,12 @@ PYTHON_INCLUDE := /usr/include/python2.7 \ # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# We need to be able to find libpythonX.X.so or .dylib. -PYTHON_LIB := /usr/lib -# PYTHON_LIB := $(ANACONDA_HOME)/lib +PYTHON_LIB := /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/ +# PYTHON_LIB := $(HOME)/anaconda/lib
# Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include -LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib +LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib $(MATLAB_DIR)/bin/maci64 /usr/lib
# Uncomment to use `pkg-config` to specify OpenCV library paths. # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
在编译过程中遇见链接 python错了,链接到了系统的 python, 经过 Google 和修改才解决,这就是个坑。