caffe 部分报错解决方法

来源:互联网 发布:linux权限 编辑:程序博客网 时间:2024/06/05 18:40

make runtest 时报错:
error while loading shared libraries: libmkl_rt.so: cannot open shared objectfile: No such file or directory
解决方法:(sudo下进行才有权限)
/etc/ld.so.conf.d/
文件夹下新建一个文件命名为:intel_mkl_settings.conf
然后在里面添加MKL库路径:/opt/intel/mkl/lib/intel64
最后确认:$ sudo ldconfig


20 errors detected in the compilation of"/tmp/tmpxft_00002703_00000000-16_cudnn_conv_layer.compute_50.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/layers/cudnn_conv_layer.o] Error1
make: *** Waiting for unfinished jobs....

解决方法:http://www.mobile-open.com/2016/938351.html


ImportError: No module named caffe
解决方法:$ exportPYTHONPATH=/home/username/caffe-master/python


四 运行detect_mango.py 报错 :scale =crop_size / (1. * crop_size - self.context_pad * 2)
ZeroDivisionError: float division by zero
解决方法:修改"--context_pad"的数值


五 运行detect.py 报错:ValueError:'axis' entry 2 is out of bounds (-2, 2)
解决方法:修改$CAFFE-ROOT/python/caffe/detector.py中第86行左右:
predictions = out[self.outputs[0]].squeeze(axis=(2, 3))
 改为 
predictions = out[self.outputs[0]].squeeze()


ImportError: No module named cv2
解决方法:$ sudo apt-get install python-opencv


七 运行train_faster_rcnn_alt_opt.py时,
报错assert (boxes[:, 2] >= boxes[:, 0]).all()
AssertionError

解决方法:矩形标注坐标不能有0,含坐标信息的Result.txt文件不能有空行


0 0