我在没有Ubuntu 14.04
的情况下使用GPU
,我想运行此代码(仅限CPU
):https://github.com/xinleipan/py-faster-rcnn-with-new-dataset。
我这样做:python ./tools/demo.py --cpu --net vgg16
他打印出这个错误:
I0505 14:45:53.473182 7095 net.cpp:122] Setting up rpn_cls_prob_reshape
I0505 14:45:53.473208 7095 net.cpp:129] Top shape: 1 18 14 14 (3528)
I0505 14:45:53.473222 7095 net.cpp:137] Memory required for data: 117496524
I0505 14:45:53.473233 7095 layer_factory.hpp:77] Creating layer proposal
I0505 14:45:53.515135 7095 net.cpp:84] Creating Layer proposal
I0505 14:45:53.515180 7095 net.cpp:406] proposal <- rpn_cls_prob_reshape
I0505 14:45:53.515198 7095 net.cpp:406] proposal <- rpn_bbox_pred
I0505 14:45:53.515211 7095 net.cpp:406] proposal <- im_info
I0505 14:45:53.515228 7095 net.cpp:380] proposal -> rois
Traceback (most recent call last):
File "./tools/demo.py", line 134, in <module>
net = caffe.Net(prototxt, caffemodel, caffe.TEST)
AttributeError: can't set attribute
如何解决这个
答案 0 :(得分:0)
此PR表示问题与caffe版本不匹配有关。只需评论以下一行
self_.attr("phase") = static_cast(this->phase_);
中的include/layers/python_layer.hpp