1、训练 VOC2007 数据集 用 GPU 训练 matlab 接口
错误内容:glog check error, please check log and clear mex
错误原因:cuda7.5 换成 8.0 即可
2、TypeError: slice indices must be integers or None or have an index
method
这是由于 numpy 的版本太高,numpy 1.12.0 对这个做了些调整,把 numpy 降级到
1.11.0 就行了。
参考了这篇:
sudo pip install -U numpy==1.11.0
但是我的服务器中有两个 python,2.7 和 3.4,而系统默认 pip 是装在 python3.4 上
的,这样可以看见:
输入:pip --version
显示:pip 9.0.1 from /usr/local/lib/python3.4/dist-packages (python 3.4)
所以执行以下代码,装到强制装到 python2.7 中:
sudo python2.7 /usr/local/bin/pip install -U numpy==1.11.0
至此 py-faster-rcnn 在我这儿可以顺利训练了
numpy 降级之后 又出现 numpy.core.multiarray failed to import
这里还是因为 numpy 版本的原因,最好的解决办法还是换 numpy 版本(见
problem2),但同样也有其他的解决办法。
修改 /home/lzx/py-faster-rcnn/lib/rpn/proposal_target_layer.py,转到 123
行:
for ind in inds:
cls = clss[ind]
start = 4 * cls
end = start + 4
bbox_targets[ind, start:end] =
bbox_target_data[ind, 1:]
bbox_inside_weights[ind, start:end] =
cfg.TRAIN.BBOX_INSIDE_WEIGHTS
return bbox_targets, bbox_inside_weights
1