- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My prototxt is like below:
I output single layer result(conv5_5_CPM_L1, conv5_5_CPM_L2, relu4_4_CPM_1) is all right(Use neural compute stick).
However, I get the concat_stage2 output, the result is error.
I get the concat_stage2 output use caffe on PC , the result right.
I doubt that is ncs Concat operation has something error..
Could someone help me ?
….
….
layer {
name: "relu4_4_CPM_1"
type: "ReLU"
bottom: "conv4_4_CPM"
top: "relu4_4_CPM_1"
}
….
….
layer {
name: "conv5_5_CPM_L1"
type: "Convolution"
bottom: "conv5_4_CPM_L1"
top: "conv5_5_CPM_L1"
param {
lr_mult: 1.0
decay_mult: 1
}
param {
lr_mult: 2.0
decay_mult: 0
}
convolution_param {
num_output: 38
pad: 0
kernel_size: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "conv5_5_CPM_L2"
type: "Convolution"
bottom: "conv5_4_CPM_L2"
top: "conv5_5_CPM_L2"
param {
lr_mult: 1.0
decay_mult: 1
}
param {
lr_mult: 2.0
decay_mult: 0
}
convolution_param {
num_output: 19
pad: 0
kernel_size: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "concat_stage2"
type: "Concat"
bottom: "relu4_4_CPM_1"
bottom: "conv5_5_CPM_L1"
bottom: "conv5_5_CPM_L2"
top: "concat_stage2"
concat_param {
axis: 1
}
}
- Tags:
- Caffe
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
:o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem. Have you fix it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@maqiao Have you tried using the latest NCSDK 2.05 and using the -ec option when compiling/checking your model?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel I have the following layers as my output layers :
layer {
name: "68point"
type: "InnerProduct"
bottom: "fc7"
top: "68point"
inner_product_param {
num_output: 136
}
}
layer {
name: "poselayer"
type: "InnerProduct"
bottom: "fc7"
top: "poselayer"
inner_product_param {
num_output: 3
}
}
I added a concat layer to the deploy.prototxt as below :
layer {
name: "concat"
bottom: "poselayer"
bottom: "68point"
top: "concat"
type: "Concat"
concat_param {
axis:1
}
}
When I try to profile it I get the following error :
ValueError: cannot reshape array of size 3 into shape (1,1,139)
When I add the -ec option I get the following error :
ValueError: cannot reshape array of size 136 into shape (1,1,139)
So only one final variable is added to the blob generated by the caffe parser and not both
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@karthik Is the Concat layer in your post above the last layer in your Caffe model? There is a known issue with NCSDK running Caffe and TensorFlow models that have the last layer being a Concat layer. Can you provide a link to your model so that I can reproduce the issue? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel The model I use is from the following github repo : https://github.com/guozhongluo/head-pose-estimation-and-face-landmark/blob/master/model/deploy.prototxt
I've concatenated the last two layers as below :
layer {
name: "concat"
bottom: "poselayer"
bottom: "68point"
top: "concat"
type: "Concat"
concat_param {
axis:1
}
}
Yup last layer is Concat, I was able to overcome this issue by adding a dummy reshape layer after concat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@karthik I'm glad to hear that you were able to find a workaround. Can you share the details of your reshape layer? I'm sure it would be useful to our community users. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The concat layer is as follows :
layer {
name: "reshape"
type: "Reshape"
bottom: "concat"
top: "reshape"
reshape_param {
shape {
dim: 1
dim: 1
dim: 139
}
}
}
I'm very new to Caffe, It's a simple reshape layer I copied from the official site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@karthik
does the reshape layer in tensorflow can bypass the concat layer's bug ?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page