Caffe
错误:采用make方式编译时遇到如下错误
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
from /usr/include/boost/python/args.hpp:8,
from /usr/include/boost/python.hpp:11,
from tools/caffe.cpp:2:
/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.
Makefile:575: recipe for target '.build_release/tools/caffe.o' failed
make: *** [.build_release/tools/caffe.o] Error 1
解决方案:修改Makefile.config,将
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
取消以下2行注释
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
Note:$(ANACONDA_HOME) #虚拟环境Anaconda2的根目录
Faster-RCNN
问题:如何编译只采用cpu版本的Faster-RCNN?
解决方案:
在./lib/setup.py中注释以下部分
...
#CUDA = locate_cuda()
...
...
#self.set_executable('compiler_so', CUDA['nvcc'])
...
...
#Extension('nms.gpu_nms',
#[‘nms/nms_kernel.cu', 'nms/gpu_nms.pyx'],
#library_dirs=[CUDA['lib64']],
#libraries=['cudart'],
#language='c++',
#runtime_library_dirs=[CUDA['lib64']],
## this syntax is specific to this build system
## we're only going to use certain compiler args with nvcc and not with
## gcc the implementation of this trick is in customize_compiler() below
#extra_compile_args={'gcc': ["-Wno-unused-function"],
#’nvcc': ['-arch=sm_35',
#’—ptxas-options=-v',
#’-c’,
#’—compiler-options',
#”’-fPIC'"]},
#include_dirs = [numpy_include, CUDA['include']]
#)
其他
问题: wget如何避免防火墙的影响?
解决方案:
在命令
wget xxx
#如wget https://www.dropbox.com/s/87zu4y6cvgeu8vs/test.model?dl=0 -O models/pvanet/full/test.model
之后加
—no-check-certificate