首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更快的RCNN使失败

更快的RCNN使失败
EN

Stack Overflow用户
提问于 2017-01-30 02:49:21
回答 1查看 271关注 0票数 0

几天来,我一直在尝试让运行速度更快的RCNN在装有K5100M的笔记本电脑上运行。我可以在只有CPU的笔记本电脑上运行demo.py。我使用的是CUDA8和CuDnn 4,caffe构建工作正常,但caffe在更快的rcnn中的构建过程不能。由于其他一些错误,我现在已经将CuDnn注释掉了。有人能给我一些建议吗?

我在make -j8 && make pycaffe过程中得到这个错误。

.build_release/tools/extract_features.o: In functionint feature_extraction_pipeline(int,char**)':extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc_Z27feature_extraction_pipelineIfEiiPPc+0x162):对caffecaffe::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()的未定义引用: caffe.cpp:(.text+0x1157):对caffecaffe::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()的未定义引用: 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 tocaffe::P2PSync::run(std::vector的未定义引用> const&)‘caffe.cpp:(.text+0x2a73):对caffe::P2PSync<float>::~P2PSync()' caffe.cpp:(.text+0x3c53): undefined reference tocaffe::P2PSync::~P2PSync()’caffe.cpp:(.text+0x3f45):未定义的caffe::P2PSync<float>::~P2PSync()' .build_release/tools/caffe.o: In functiontime()引用: 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 tocaffe引用::Layer::Lock()‘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引用

代码语言:javascript
复制
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 ?= @
EN

回答 1

Stack Overflow用户

发布于 2017-05-23 09:24:59

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41924639

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档