Caffe安装错误及其解决方法

1、问题:多用户使用python,可以用anaconda来管理python,具体网址为:python.jobbole.com/86236/

2、apt-get软件包没有被完全安装或卸载解决,解决方法:
http://www.cnblogs.com/lidan/archive/2011/11/20/2256137.html

3、问题:./include/caffe/util/cudnn.hpp:5:19: fatal error: cudnn.h: 没有那个文件或目录
解决方法:在Makefile.config中添加#include<cudnn.h>

4、问题:“fatal error: hdf5.h: 没有那个文件或目录”解决方法
解决方法:
(1)在Makefile.config文件的第85行,添加/usr/include/hdf5/serial/ 到 INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
(2)在Makefile文件的第173行,把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial,也就是把下面第一行代码改为第二行代码。
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

5、问题:caffe/blob.hpp:9:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
解决方法: 用protoc从caffe/src/caffe/proto/caffe.proto生成caffe.pb.h和caffe.pb.cc

wuliwei@wulw:~/caffe/src/caffe/proto$ protoc --cpp_out=/当前路径 caffe.proto 

6、问题:.build_release/lib/libcaffe.so: undefined reference to cv::imread(cv::String const&, int)’
解决方法:add “opencv_imgcodecs” in Makefile to LIBRARIES += glog gflags protobuf leveldb snappy

7、问题:执行完make pycaffe -j后再在/etc/profile中导入caffe/python的语句如下:
sudo vi /etc/profile # 编辑profile文件
export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH

做完以上事情之后,还是没办法在python中import进去caffe
解决:再加一句source /etc/profile.

8、问题:ImportError: No module named easydict(类似与上面的错误)
解决:sudo pip install easydict

9、问题:libstdc++.so.6: version `GLIBCXX_3.4.21’ not found
解决:http://blog.csdn.net/rznice/article/details/51090966 (注意源文件夹和目标文件夹是要根据实际情况改变的)

10、问题:caffe在matlab下运行到caffe.caffeset_mode_gpu()时报错,undefined ‘caffe’ or class ‘caffe’
解决:
http://www.caffecn.cn/?/question/298

11、问题:Traceback (most recent call last): File “example.py”, line 58, in flow = cv2.calcOpticalFlowFarneback(gray1, gray2,0.5, 3, 15, 2, 5, 1.2, 0) # calculating the flow between gray1 and gray2 using gunner farneback algorithm TypeError: integer argument expected, got float
解决:http://answers.opencv.org/question/123647/type-error-expected-intiger-got-float/

12、问题:error: ‘GetSolver’ is not a member of ‘caffe’
解决:
将 mySolver.reset(caffe::GetSolver(solver_param));
改为 mySolver.reset(caffe::SolverRegistry::CreateSolver(solver_param));

13、问题:undefined reference tocv::VideoCapture::get(int) const’
解决:adding opencv_videoio to LIBRARIES in the Makefile

14、问题:AttributeError: ‘module’ object has no attribute ‘LabelMap’
解决:没有添加环境变量(https://github.com/weiliu89/caffe/issues/4)

15、问题:ImportError: No module named _caffe
解决:make pycaffe

16、问题:下载大数据集;
解决:nohup wget -t 0 -w 31 -c http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar -P . -o log1.txt &
查看下载进度:tail -f log1.txt
查看下载进程: ps -ef| grep wget

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值