caffe icon indicating copy to clipboard operation
caffe copied to clipboard

DataLayer definition for multi-channel input

Open liguanbin opened this issue 12 years ago • 1 comments

Hi, all, I am trying to use caffe to do classification base on some extracted feature.

I extract feature of 87 dimensions for each image (say, including the color histogram, edge saliency...). And each image has a label 0 or 1. I have already divide the data into the training set and the testing set. I have no idea how to write the protobuf definitions.

here is the protobuf definition for mnist demo. name: "LeNet" layers { name: "mnist" type: DATA top: "data" top: "label" data_param { source: "D:\gbli\caffe\caffe-windows\examples\mnist\mnist-train-leveldb" scale: 0.00390625 batch_size: 64 } }

so my problem is how should i set for data_param in my example?

liguanbin avatar Jul 02 '14 16:07 liguanbin

There's no need to specify the input dimensionality–the network will be made according to the shape of the data given in the input leveldb. As long as you prepared your data by packing it into a leveldb with channel dimension 87 the network will be constructed and trained correctly. Caffe generates the network for the given input dimensionality automatically.

shelhamer avatar Jul 30 '14 07:07 shelhamer