我编译了 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
