Hi,
What I wanted to do is to use convolution layer to train a network on non-image data(1 dimension PCM audio data). So that the dimension of the input LMDB data is i.e. 256(batch size) x 1 x 1960 x 1. In order to use convolutional filters whose size length are 2 or larger, I'll have to reshape the input data dimension to have 2-dimensional image like format. So I defined the following right after data layer:
layer {
name: "reshape"
type: "Reshape"
bottom: "data"
top: "conv1"
reshape_param {
shape {
dim: 0 # copy the dimension from below
dim: 0 # copy the dimension from below
dim: 7
dim: 280 # -1: infer it from the other dimensions
}
}
}
The data layer looks like this:
name: "LeNet"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
data_param {
source: "/path/to/lmdb_train"
batch_size: 256
backend: LMDB
}
}
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
data_param {
source: "/path/to/lmdb_test"
batch_size: 100
backend: LMDB
}
}
However, Caffe complained:
F0105 11:38:01.728590 32701 insert_splits.cpp:29] Unknown bottom blob 'data' (layer 'reshape', bottom index 0)
If I add one more output at data layer, i.e:
top: "data"
top: "label"
top: "reshape"
It complained again that one layer cannot have more that 2 outputs: "Check failed: MaxTopBlobs() >= top.size() (2 vs. 3) Data Layer produces at most 2 top blob(s) as output."
Does anyone know how to reshape 1 dimensional data to 2 dimensional between data layer and convolution layer so that LeNet is working? I can find zero resources regarding this issue.
Thanks
Hugo