搭建及训练py-R-FCN遇到的问题

搭建py-R-FCN遇到的问题记录。

make pycaffe 报错

 src/caffe/layers/box_annotator_ohem_layer.cu(49): error: a template argument may not reference a local type 

          detected during instantiation of "void caffe::BoxAnnotatorOHEMLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]" 
(80): here


src/caffe/layers/box_annotator_ohem_layer.cu(49): error: a template argument may not reference a local type
          detected during instantiation of "void caffe::BoxAnnotatorOHEMLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" 
(80): here


2 errors detected in the compilation of "/tmp/tmpxft_0000339c_00000000-19_box_annotator_ohem_layer.compute_61.cpp1.ii".
Makefile:595: recipe for target '.build_release/cuda/src/caffe/layers/box_annotator_ohem_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/box_annotator_ohem_layer.o] Error 1

解决方法:

box_annotator_ohem_layer uses C++11 features, you need to make changes to the makefile 

修改makefile

319行部分改成:

ifeq ( $(DEBUG), 1)
    
    COMMON_FLAGS += -DDEBUG -g -O0 -std=c++11
    NVCCFLAGS += -G
else
    
    COMMON_FLAGS += -DNDEBUG -O2 -std=c++11
endif



训练的时候遇到的问题:AttributeError: 'module' object has no attribute 'text_format'

之前遇到过,没记录,现在记录下来。解决方法:

在出错的文件里加上:import google.protobuf.text_format

我这里错误提示在train.py里,所以找到train.py加上import google.protobuf.text_format

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值