更快的RCNN失败

时间:2017-01-29 18:49:21

标签: deep-learning caffe object-detection

我已经尝试了几天使用GPU(Quadro K5100M)在笔记本电脑上更快地完成RCNN工作。 我能够在只有CPU的笔记本电脑中运行demo.py。 我正在使用CUDA 8和CuDnn 4以及caffe构建工作但是在更快的rcnn中构建caffe的过程却没有。由于其他一些错误,我现在已经注释掉了CuDnn。 任何人都可以给我一些建议。

我在make -j8&&amp ;;期间收到此错误做pycaffe。

.build_release/tools/extract_features.o: In function int feature_extraction_pipeline(int,char **)&#39;: extract_features.cpp :(。text._Z27feature_extraction_pipelineIfEiiPPc [_Z27feature_extraction_pipelineIfEiiPPc] + 0x162):对caffe::Net<float>::Net(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::Phase, caffe::Net<float> const*)' collect2: error: ld returned 1 exit status CXX/LD -o .build_release/examples/mnist/convert_mnist_data.bin Makefile:607: recipe for target '.build_release/tools/extract_features.bin' failed make: *** [.build_release/tools/extract_features.bin] Error 1 make: *** Waiting for unfinished jobs.... .build_release/tools/caffe.o: In function test()&#39;的未定义引用: caffe.cpp :(。text + 0x1157):未定义引用caffe::Net<float>::Net(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::Phase, caffe::Net<float> const*)' .build_release/tools/caffe.o: In function train()&#39;: caffe.cpp :(。text + 0x2a3e):未定义引用caffe::P2PSync<float>::P2PSync(boost::shared_ptr<caffe::Solver<float> >, caffe::P2PSync<float>*, caffe::SolverParameter const&)' caffe.cpp:(.text+0x2a6b): undefined reference to caffe :: P2PSync :: run(std :: vector&gt; const&amp;)&#39; caffe.cpp :(。text + 0x2a73):未定义引用caffe::P2PSync<float>::~P2PSync()' caffe.cpp:(.text+0x3c53): undefined reference to caffe :: P2PSync :: ~P2PSync()&#39; caffe.cpp :(。text + 0x3f45):对caffe::P2PSync<float>::~P2PSync()' .build_release/tools/caffe.o: In function time()&#39;的未定义引用: caffe.cpp :(。text + 0x4136):未定义引用caffe::Net<float>::Net(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::Phase, caffe::Net<float> const*)' caffe.cpp:(.text+0x44ef): undefined reference to caffe :: Layer :: Lock()&#39; caffe.cpp :(。text + 0x45ed):对caffe::Layer<float>::Unlock()' collect2: error: ld returned 1 exit status Makefile:607: recipe for target '.build_release/tools/caffe.bin' failed

的未定义引用
This is my makefile
# USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# Uncomment if you're using OpenCV 3
 OPENCV_VERSION := 3
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda-8.0
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

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_50,code=compute_50

BLAS := atlas
#BLAS := open

# 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/local/lib/python2.7/dist-packages/numpy/core/include \
        /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy

# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib

# Uncomment to support layers written in Python (will link against Python libs)
 WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial /usr/include/opencv /usr/local/cuda-8.0/include 
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial /usr/local/share/OpenCV /usr/local/cuda-8.0/lib64

# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

# enable pretty build (comment to see full commands)
Q ?= @

1 个答案:

答案 0 :(得分:0)

我遇到了同样的错误,因为我的库路径(/ usr / lib /)包含以前的libcaffe.so版本。删除它解决了问题。