python - 制作 pycaffe -> "fatal error: cublas_v2.h: No such file or directory"

标签 python neural-network deep-learning caffe

我编译了caffe并且我知道尝试编译pycaffe。当我在 caffe 根文件夹中运行 make pycaffe 时,我得到:

f@f-VirtualBox:~/caffe/caffe-master$ make pycaffe
CXX src/caffe/layer_factory.cpp
In file included from ./include/caffe/common.hpp:19:0,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layer.hpp:8,
                 from src/caffe/layer_factory.cpp:3:
./include/caffe/util/device_alternate.hpp:34:23: fatal error: 
 cublas_v2.h: No such file or directory
 #include <cublas_v2.h>
                       ^
compilation terminated.
Makefile:516: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1

如何解决这个问题?

最佳答案

如果您不打算使用 GPU,可以通过在 Makefile.config 中取消注释 CPU_ONLY := 1 来规避该问题:

# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

关于python - 制作 pycaffe -> "fatal error: cublas_v2.h: No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31345255/

相关文章:

Python - 如何将字典作为值而不是引用传递给 defaultdict

python - 有没有办法修改TensorFlow中inception-v3的python代码?

python - ValueError : Variable rnn/basic_rnn_cell/kernel already exists, 不允许。您的意思是在 VarScope 中设置 reuse=True 或 reuse=tf.AUTO_REUSE 吗?

python - 如何(有效地)在 TensorFlow 中应用 channel 级全连接层

machine-learning - 辍学率理想值?

python - 当binary = False时,如何从树结构中提取诸如PER、ORG、GPE之类的命名实体?

python - 在 Spark 中导入具有不同 header 的 DataFrame 中的多个 csv

python - 用任意数量的空格分割字符串

python - 在 tensorflow 中与许多输入数据文件很好地混合

crop - 过度裁剪图像会导致深度学习模型性能不佳吗?