Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPN_BF caffe cudnn compiling error #11

Closed
juntingzh opened this issue Oct 3, 2016 · 5 comments
Closed

RPN_BF caffe cudnn compiling error #11

juntingzh opened this issue Oct 3, 2016 · 5 comments

Comments

@juntingzh
Copy link

Hello, I tried to compile RPN_BF customized caffe but got an cudnn ralated error.

The error message is given below:
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/internal_thread.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from ./include/caffe/internal_thread.hpp:4,
from src/caffe/internal_thread.cpp:2:
./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:123:3: error: too few arguments to function ‘cudnnStatus_t cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, int)’
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/internal_thread.hpp:4,
from src/caffe/internal_thread.cpp:2:
/usr/local/include/cudnn.h:803:27: note: declared here
Makefile:521: recipe for target '.build_release/src/caffe/internal_thread.o' failed
make: *** [.build_release/src/caffe/internal_thread.o] Error 1

My environment is ubuntu 15.04, with cuda 5.7 cudnn v5. I suspect the customized caffe is outdated and does not support cudnn v5. Any suggestions will be appreciated!

@zhangliliang
Copy link
Owner

Hi,

There might be several options.
a. Modify the Makefile.config to disable the cudnn before compling this repo.
b. Use older cudnn version like v4 or v3.
c. Merge this repo into current caffe version, which support cudnn v5.

@juntingzh
Copy link
Author

@zhangliliang Thanks! I solved the issue by copying the cudnn-related files from the latest caffe.
Now I am trying to train a RPN_BF model. I downloaded and unzipped the VGG-16 pretrain model and the relative prototxt. However, the VGG16_caltech/bf_prototxts/test_feat_conv34atrous_v2.prototxt file seems broken, and I cannot open it. I tried both onedrive and baiduyun links. Can you check it?

@zhangliliang
Copy link
Owner

@juntingzh

Sorry for replying late since I am just onboard.

You might try to use that prototxt in the final model tar for backup. And I also paste it as below.

name: "VGG_ILSVRC_16"

input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224

input: "rois"
input_dim: 1 # to be changed on-the-fly to num ROIs
input_dim: 5 # [batch ind, x1, y1, x2, y2] zero-based indexing
input_dim: 1
input_dim: 1

layer {
bottom: "data"
top: "conv1_1"
name: "conv1_1"
type: "Convolution"
param {
lr_mult: 0.0
}
param {
lr_mult: 0.0
}
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv1_1"
top: "conv1_1"
name: "relu1_1"
type: "ReLU"
}

layer {
bottom: "conv1_1"
top: "conv1_2"
name: "conv1_2"
param {
lr_mult: 0.0
}
param {
lr_mult: 0.0
}
type: "Convolution"
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv1_2"
top: "conv1_2"
name: "relu1_2"
type: "ReLU"
}

layer {
bottom: "conv1_2"
top: "pool1"
name: "pool1"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}

layer {
bottom: "pool1"
top: "conv2_1"
name: "conv2_1"
param {
lr_mult: 0.0
}
param {
lr_mult: 0.0
}
type: "Convolution"
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv2_1"
top: "conv2_1"
name: "relu2_1"
type: "ReLU"
}

layer {
bottom: "conv2_1"
top: "conv2_2"
name: "conv2_2"
param {
lr_mult: 0.0
}
param {
lr_mult: 0.0
}
type: "Convolution"
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv2_2"
top: "conv2_2"
name: "relu2_2"
type: "ReLU"
}

layer {
bottom: "conv2_2"
top: "pool2"
name: "pool2"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}

layer {
bottom: "pool2"
top: "conv3_1"
name: "conv3_1"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv3_1"
top: "conv3_1"
name: "relu3_1"
type: "ReLU"
}

layer {
bottom: "conv3_1"
top: "conv3_2"
name: "conv3_2"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv3_2"
top: "conv3_2"
name: "relu3_2"
type: "ReLU"
}

layer {
bottom: "conv3_2"
top: "conv3_3"
name: "conv3_3"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}

layer {
bottom: "conv3_3"
top: "conv3_3"
name: "relu3_3"
type: "ReLU"
}

layer {
bottom: "conv3_3"
top: "pool3"
name: "pool3"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 1
}
}

layer {
bottom: "pool3"
top: "conv4_1"
name: "conv4_1"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 512
pad: 2
kernel_size: 3
filter_stride: 2
}
}

layer {
bottom: "conv4_1"
top: "conv4_1"
name: "relu4_1"
type: "ReLU"
}

layer {
bottom: "conv4_1"
top: "conv4_2"
name: "conv4_2"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 512
pad: 2
kernel_size: 3
filter_stride: 2
}
}

layer {
bottom: "conv4_2"
top: "conv4_2"
name: "relu4_2"
type: "ReLU"
}

layer {
bottom: "conv4_2"
top: "conv4_3"
name: "conv4_3"
param {
lr_mult: 1.0
}
param {
lr_mult: 2.0
}
type: "Convolution"
convolution_param {
num_output: 512
pad: 2
kernel_size: 3
filter_stride: 2
}
}

layer {
bottom: "conv4_3"
top: "conv4_3"
name: "relu4_3"
type: "ReLU"
}

------------- roi layer --------

layer {
bottom: "conv3_3"
bottom: "rois"
top: "roi_pool3"
name: "roi_pool3"
type: "ROIPooling"
roi_pooling_param {
pooled_w: 7
pooled_h: 7
spatial_scale: 0.25 # (1/4)
}
}

layer {
bottom: "conv4_3"
bottom: "rois"
top: "roi_pool4_3"
name: "roi_pool4_3"
type: "ROIPooling"
roi_pooling_param {
pooled_w: 7
pooled_h: 7
spatial_scale: 0.25 # (1/4)
}
}

layer {
bottom: "roi_pool3"
top: "roi_pool3_flat"
name: "roi_pool3_flat"
type: "Flatten"
}

layer {
bottom: "roi_pool4_3"
top: "roi_pool4_3_flat"
name: "roi_pool4_3_flat"
type: "Flatten"
}

layer {
bottom: "roi_pool3_flat"
bottom: "roi_pool4_3_flat"
top: "concat_feat"
name: "concat_feat"
type: "Concat"
}

@TaoZheng
Copy link

TaoZheng commented Jan 8, 2017

@juntingzh Hi,I encountered the same problem as you.

(@zhangliliang Thanks! I solved the issue by copying the cudnn-related files from the latest caffe.
Now I am trying to train a RPN_BF model. I downloaded and unzipped the VGG-16 pretrain model and the relative prototxt. However, the VGG16_caltech/bf_prototxts/test_feat_conv34atrous_v2.prototxt file seems broken, and I cannot open it. I tried both onedrive and baiduyun links. Can you check it?)

I would like to ask,which specific documents to be replaced and where to amend ?
I am very appreciate you to answer this!Thank you very much!

@kli017
Copy link

kli017 commented Oct 10, 2017

@juntingzh hello I met similar problem when I compile pycaffe in faster-rcnn. Can you tell me what files have you copied from the last version caffe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants