2017-08-05 61 views
1

我想在TX1上安装py-faster-rcnn,并且我遵循https://devtalk.nvidia.com/default/topic/974063/jetson-tx1/caffe-failed-with-py-faster-rcnn-demo-py-on-tx1/,修改/ caffe-fast-rcnn/Makefile和/caffe-fast-rcnn/Makefile.config,但是当我尝试创建它时,问题出现:如何在Jetson TX1上安装py-faster-rcnn?

[email protected]:~/py-faster-rcnn/caffe-fast-rcnn$ make 
PROTOC src/caffe/proto/caffe.proto 
CXX .build_release/src/caffe/proto/caffe.pb.cc 
CXX src/caffe/layer_factory.cpp 
In file included from ./include/caffe/util/device_alternate.hpp:40:0, 
       from ./include/caffe/common.hpp:19, 
       from ./include/caffe/blob.hpp:8, 
       from ./include/caffe/layer.hpp:8, 
       from src/caffe/layer_factory.cpp:8: 
./include/caffe/util/cudnn.hpp: In function ‘void 
caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, 
caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, 
int, int, int, int)’: 
./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to 
function ‘cudnnStatus_t 
cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, 
cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, 
int)’ 
    pad_h, pad_w, stride_h, stride_w)); 
            ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 
‘CUDNN_CHECK’ 
cudnnStatus_t status = condition; \ 
         ^
In file included from ./include/caffe/util/cudnn.hpp:5:0, 
       from ./include/caffe/util/device_alternate.hpp:40, 
       from ./include/caffe/common.hpp:19, 
       from ./include/caffe/blob.hpp:8, 
       from ./include/caffe/layer.hpp:8, 
       from src/caffe/layer_factory.cpp:8: 
/usr/include/cudnn.h:803:27: note: declared here 
cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor(
        ^
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetTanHLayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:237:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetTanHLayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:237:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSoftmaxLayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:214:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSoftmaxLayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:214:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSigmoidLayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:191:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSigmoidLayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:191:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetReLULayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:168:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetReLULayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:168:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetLRNLayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:145:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetLRNLayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:145:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
} 
^ 
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetPoolingLayer(const 
caffe::LayerParameter&) [with Dtype = double]’: 
src/caffe/layer_factory.cpp:108:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
    } 
    ^
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetPoolingLayer(const 
caffe::LayerParameter&) [with Dtype = float]’: 
src/caffe/layer_factory.cpp:108:1: warning: control reaches end of 
non-void function [-Wreturn-type] 
    } 
^
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > 
caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = 
double]’: 
src/caffe/layer_factory.cpp:71:1: warning: control reaches end of non- 
void function [-Wreturn-type] 
    } 
^
src/caffe/layer_factory.cpp: In function 
‘boost::shared_ptr<caffe::Layer<Dtype> > 
caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = 
float]’: 
src/caffe/layer_factory.cpp:71:1: warning: control reaches end of non- 
void function [-Wreturn-type] 
    } 
^
Makefile:564: recipe for target 
'.build_release/src/caffe/layer_factory.o' failed 
make: *** [.build_release/src/caffe/layer_factory.o] Error 1 

如何解决这个问题? 感谢

回答

0

我解决了它,也许原来的PY-快rcnn不支持cudnnv5非常好,所以我从/朱古力到/ PY-更快rcnn /朱古力 - 快 - rcnn复制以下文件:

include/caffe/util/:cudnn.hpp 
src/caffe/layers/:cudnn_conv_layer.cu 
        cudnn_relu_layer.cpp 
        cudnn_relu_layer.cu 
        cudnn_sigmoid_layer.cpp 
        cudnn_sigmoid_layer.cu 
        cudnn_tanh_layer.cpp 
        cudnn_tanh_layer.cu 

include/caffe/layers/:cudnn_relu_layer.hpp 
         cudnn_sigmoid_layer.hpp 
         cudnn_tanh_layer.hpp 

它的工作原理。

0

这是一个适合我的解决方案。

将caffe master分支合并成caffe-fast-rcnn。

cd caffe-fast-rcnn 
git remote add caffe https://github.com/BVLC/caffe.git 
git fetch caffe 
git merge -X theirs caffe/master 

合并后取下包括/ CAFFE /层/ python_layer.hpp self_.attr("phase") = static_cast<int>(this->phase_);

我从here得到它。

+0

谢谢,我用/ caffe文件夹替换/ py-faster-rcnn/caffe-fast-rcnn中的相应文件:1.include/caffe/util /:cudnn.hp p 2.src/caffe /图层/:cudnn_conv_layer.cu,cudnn_relu_layer.cpp,cudnn_relu_layer.cu,cudnn_sigmoid_layer.cpp,cudnn_sigmoid_layer.cu,cudnn_tanh_layer.cpp,cudnn_tanh_layer.cu 012包括/ caffe/layers /:cudnn_relu_layer.hpp,cudnn_sigmoid_layer.hpp,cudnn_tanh_layer。 hpp,它工作 – evbo