caffe reshape 层可以帮助你把任意的输入维数变成你想要的输出维数。
layer {
name: "reshape1"
type: "Reshape"
bottom: "conv1"
top: "conv1res"
reshape_param {
shape {
dim: 0 ####0 keep origin dimension
dim: 1 #### 1 dim
dim: 0
dim: -1 #### compute automatically according to bottom count
}
}
}