在ubuntu14.04中安装Caffe

2024-09-27 07:34:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在按照https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-ec2-instance链接在我的机器上安装caffe。 但是当我写命令$ make时,我得到了这些错误

/usr/local/cuda/bin/nvcc -ccbin=g++ -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/local/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda/include -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 -c src/caffe/util/math_functions.cu -o build/src/caffe/util/math_functions.cuo

Error 1:
src/caffe/util/math_functions.cu(140): error: calling a __host__ function("std::signbit<float> ") from a __global__ function("caffe::sgnbit_kernel<float> ") is not allowed

Error 2:
src/caffe/util/math_functions.cu(140): error: calling a __host__ function("std::signbit<double> ") from a __global__ function("caffe::sgnbit_kernel<double> ") is not allowed

2 errors detected in the compilation of "/tmp/tmpxft_00003368_00000000-12_math_functions.compute_35.cpp1.ii".
make: *** [build/src/caffe/util/math_functions.cuo] Error 2

我是新手,真的不知道丢失了什么包


Tags: srcincludeusrlocalutilcodefunctionmath
1条回答
网友
1楼 · 发布于 2024-09-27 07:34:26

(这对一家未合并的龙戎咖啡店有效。)

在 caffe/include/caffe/util/math_函数.hpp在

试着换衣服

using std::signbit;
DEFINE_CAFFE_CPU_UNARY_FUNC(sgnbit, y[i] = signbit(x[i])); 

^{pr2}$

相关问题 更多 >

    热门问题