利用anaconda配置caffe cpu版本使用

版权声明:学无止境,好好学习 https://blog.csdn.net/m0_38116269/article/details/88760523

anaconda 有cpu版本的caffe框架可以下载使用,目前在Python下运行挺正常。但是在尝试使用C++进行搞的时候却出了点问题。

Scanning dependencies of target caffe_test
[ 50%] Building CXX object CMakeFiles/caffe_test.dir/caffetest.cpp.o
In file included from /home/wwh/anaconda3/include/caffe/common.hpp:19:0,
                 from /home/wwh/anaconda3/include/caffe/blob.hpp:8,
                 from /home/wwh/anaconda3/include/caffe/caffe.hpp:7,
                 from /home/wwh/Documents/cplusProj/caffetest.cpp:1:
/home/wwh/anaconda3/include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No such file or directory
compilation terminated.
CMakeFiles/caffe_test.dir/build.make:62: recipe for target 'CMakeFiles/caffe_test.dir/caffetest.cpp.o' failed
make[2]: *** [CMakeFiles/caffe_test.dir/caffetest.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/caffe_test.dir/all' failed
make[1]: *** [CMakeFiles/caffe_test.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

我估计,一、自己的CMakeLists.txt没有配置好;二、默认给我查cuda的相关头文件报错。
理论上说,既然python可以用,那么C++版本也是可以测试的。现在需要进一步尝试。
我准备改一下那个anaconda/include/caffe/里面的一个文件内容,把cuda部分删除掉试一下。

猜你喜欢

转载自blog.csdn.net/m0_38116269/article/details/88760523