- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有人可以在安装过程中编译caffe时帮助我解决这些错误吗?
这是我修改的caffe文件的Makefile.config
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are 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 not set this flag if you will be 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 is 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 are 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 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_50,code=compute_50
# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := 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 is 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 will 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 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
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
ANACONDA_HOME := $(HOME) /home/desmond/anaconda2
PYTHON_INCLUDE := $(ANACONDA_HOME) /home/desmond/anaconda2/include \
$(ANACONDA_HOME) /home/desmond/anaconda2/include/python2.7 \
$(ANACONDA_HOME) /home/desmond/anaconda2/lib/python2.7/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 be able to find libpythonX.X.so or .dylib.
#PYTHON_LIB := /usr/lib
PYTHON_LIB := $/home/desmond/anaconda2/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 (will link against Python libs)
WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/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.)
# USE_PKG_CONFIG := 1
# 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 ?= @
然后是相应的编译结果(或错误)(提示:Error表示错误或错误)
desmond@desmond-Lenovo-IdeaPad-Y400:~/caffe-master$ make all -j4
CXX src/caffe/util/db_leveldb.cpp
CXX src/caffe/parallel.cpp
CXX src/caffe/util/db_lmdb.cpp
CXX src/caffe/util/upgrade_proto.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from ./include/caffe/util/db.hpp:6,
from ./include/caffe/util/db_leveldb.hpp:10,
from src/caffe/util/db_leveldb.cpp:2:
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from ./include/caffe/util/db.hpp:6,
from ./include/caffe/util/db_lmdb.hpp:10,
from src/caffe/util/db_lmdb.cpp:2:
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_debug/src/caffe/util/db_leveldb.o] 错误 1
make: *** 正在等待未完成的任务....
make: *** [.build_debug/src/caffe/util/db_lmdb.o] 错误 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from src/caffe/util/upgrade_proto.cpp:8:
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_debug/src/caffe/util/upgrade_proto.o] 错误 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from ./include/caffe/blob.hpp:8,
from ./include/caffe/caffe.hpp:7,
from src/caffe/parallel.cpp:12:
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp:136:68: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
CUDNN_PROPAGATE_NAN, h, w, pad_h, pad_w, stride_h, stride_w));
^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
cudnnStatus_t status = condition; \
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_debug/src/caffe/parallel.o] 错误 1
最佳答案
</path/to/cuda>
和</path/to/cudnn>
,分别在您的终端中:
sudo cp </path/to/cudnn>/lib64/libcudnn* </path/to/cuda>/lib64
sudo cp </path/to/cudnn>/include/cudnn.h </path/to/cuda>/include
export PATH=</path/to/cuda>/bin:$PATH
export LD_LIBRARY_PATH=</path/to/cuda>/lib64</path/to/cudnn>:$LD_LIBRARY_PATH
source ~/.bashrc
在 Makefile.config
,更改此行
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
到
CUDA_DIR := </path/to/cuda>
make all -j8 && make pycaffe -j8 && make run -j8 && make runtest -j8
关于machine-learning - 安装时编译caffe文件(Makefile.config)时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37746917/
我有一个 Makefile,它针对特定目标调用另一个 Makefile。假设主 Makefile 包含 some_dir/some_target: cd some_dir && make so
这两个文件大多出现在开源项目中。 它们的用途是什么?它们如何工作? 最佳答案 Makefile.am 是程序员定义的文件,由 automake 使用来生成 Makefile.in 文件( .am 代表
我的源代码位于一堆子目录中,例如: src/widgets/apple.cpp src/widgets/knob.cpp src/tests/blend.cpp src/ui/flash.cpp 在项
这就是我所拥有的: SUBDIRS = src/lib/ResourceManager all: $(SUBDIRS) $(SUBDIRS): make install -C $@ 我正在尝试
我想写一个 Makefile 来执行来自两个不同数组的两个输入的命令例如 a = A B C b = 1 2 3 ./run A 1 ./run B 2 ./run C 3 我不知道怎么写,因为在Ma
在 GNU make 手册的早期部分之一,Section 3.7 , 有一个 makefile 配方的大纲 immediate : immediate ; deferred defer
是否存在将 gmake 的 GNU Makefile 转换为可用于 make (FreeBSD-make) 的 Makefile 的实用程序? 最佳答案 该实用程序称为开发人员(程序员,制作大师,..
所以我前段时间了解了什么是 Makefile,创建了一个模板 Makefile,我所做的就是为我正在执行的每个程序复制和更改相同的文件。我改了几次,但它仍然是一个非常粗糙的Makefile。我应该如何
我正在做一些 Makefile 重构,并试图找出最简洁的方法来实现一个 Makefile,它执行以下操作: 有一个变量列出了所有源文件(可以是 C 和 C++ 文件) 所有目标文件都在 OBJ_DIR
我正在尝试创建一个 Makefile,它将通过 tic 编译位于目录中的 terminfo 文件。 tic 还将它自动创建的 termcap 文件复制到系统或用户特定的目标文件夹。对于普通用户,如果
我想要类似的东西 BROKEN_THINGS = \ thing1 \ # thing1 is completely broken thing2 \ # thing2 is broken to
如果我的程序必须为不同的结果(主要是错误)返回不同的值(例如 0、1、2、3 等),则调用该程序的 makefile 将不得不停止执行其余的 makefile 命令。即使该命令产生错误(返回非零值),
我正在学习使用漂亮的 Linux 工具:make。还有一点我想了解的: 让我们看一下这个简单的例子: JADE = $(shell find pages/*.jade) HTML = $(JADE:.
假设您有一个包含两个伪目标“all”和“debug”的 Makefile。 'debug' 目标旨在构建与 'all' 相同的项目,除了一些不同的编译开关(例如 -ggdb)。由于目标使用不同的编译开
我有一个调用多个其他生成文件的生成文件。 我想将 -j 参数传递给其他 makefile 调用。 类似(make -j8): all: make -f libpng_linux.mk -j
我处理过的 Makefile 大部分都很复杂,并且隐藏了很多关系。我自己从来没有写过一个,想知道是否有人有一些关于编写易于阅读和可重用的 Makefile 的提示? 最佳答案 我通常使用这样的东西,在
嘿,我有一个简单的“主” Makefile,它只是调用其他 makefile。我正在尝试执行以下操作,以便以正确的顺序构建组件: LIB_A = folder_a LIB_B = folder_b L
生成文件: #there is a whitespace after "/my/path/to" FOO = "/my/path/to" BAR = "dir" INCLUDE_DIRS = $(FO
我正在学习 makefile,我知道如何创建一个简单的 makefile。我正在继续使用嵌套的 makefile。这是我的目录结构 /src ...makefile ...main.cpp ...fo
什么TEMP0_FILES下面计算到? SOURCE_FILES可以等于多个源文件。请告诉我以下语法 :.cpp=.o 的用途 SOURCE_FILES = main.cpp TEMP0_FILES
我是一名优秀的程序员,十分优秀!