跑py-faster-rcnn过程中遇到的问题

第一个:一个cudnn的问题,好像是什么out of memory,dangerous data啥的,记不清楚了。

这篇解决的,原因是,faster rcnn中的caffe不兼容cudnn 5.0:

在make caffe-fast-rcnn之前修改好,不然要记得去重新rebuild一下哦

1. cd caffe-fast-rcnn

2. git remote add caffe https://github.com/BVLC/caffe.git

3. git fetch caffe

4. git merge  caffe/master 这里如果出现了:

        *** Please tell me who you are.

        Run

        git config --global user.email "you@example.com"

        git config --global user.name "Your Name"

       请执行,参考了这个

       git config --global user.name "John Doe"

       git config --global user.email johndoe@example.com

      然后再执行一遍git merge  caffe/master

5. 然后就会报错什么冲突啥的,去include/caffe/layers/python_layer.hpp文件中,将self_.attr("phase") = static_cast(this->phase_);这一行注释掉就行了

然后把Makefile.config里面的参数啥的调调好,再执行make -j8 && make pycaffe,就应该没事了。但是我这儿merge的时候好像有奇怪的东西混进去了,没关系,按照报错去指定文件中把奇怪的东西删掉就好,再make一下应该就没啥问题了。

第二个问题: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在我这儿可以顺利训练了:

cd py-faster-rcnn

./experiments/scripts/faster_rcnn_end2end.sh 0 VGG16 pascal_voc

感动得快要哭出来!!!!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容