在CPU下编译别人GPU的caffe,太重要了

根据论文提供的caffe工程编译,显示如下问题:In file included from ./include/caffe/common.hpp:19:0, from ./include/caffe/blob.hpp:8, from ./include/caffe/layers/detection_loss_layer.hpp:6, from src/caffe/layers/detection_loss_layer.cpp:6: ./include/caffe/util/device_alternate.hpp:15:36: error: no ‘void caffe::DetectionLossLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’ member function declared in class ‘caffe::DetectionLossLayer<Dtype>’ const vector<Blob<Dtype>*>& top) { NO_GPU; } \ ^ src/caffe/layers/detection_loss_layer.cpp:222:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(DetectionLossLayer); ^ ./include/caffe/util/device_alternate.hpp:19:39: error: no ‘void caffe::DetectionLossLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)’ member function declared in class ‘caffe::DetectionLossLayer<Dtype>’ const vector<Blob<Dtype>*>& bottom) { NO_GPU; } \ ^ src/caffe/layers/detection_loss_layer.cpp:222:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(DetectionLossLayer); ^ Makefile:572: recipe for target '.build_release/src/caffe/layers/detection_loss_layer.o' failed make: *** [.build_release/src/caffe/layers/detection_loss_layer.o] Error 1 make: *** Waiting for unfinished jobs....

在网上找到答案如下:You can try removing the following lines in the detection_loss_layer.cpp

#ifdef CPU_ONLY STUB_GPU(DetectionLossLayer); #endif

解决了该问题。
--------------------- 
作者:yangpan011 
来源:CSDN 
原文:https://blog.csdn.net/yangpan011/article/details/80586728 
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值