I am trying to load data to the network, since I need a custom data input (3 tops: 1 for data image, 2 for different labels) I load the data with HD5F files. It looks similar to this:
I want to preprocess the images using Caffe's own Transformer (for standard), how can I do this when I have to initialize the Transformer with data blob of a network model:
All the examples I have found first loads a pre-trained net and sets a transformer with its data blob/shape, but I couldn't find any for training. Thanks. |
To elaborate, the Class Transformer requires the Net as parameter: Class definition: Transform input for feeding into a Net. Parameters: net : a Net for which the input should be prepared
And for preprocess, the parameters are: in_ : name of input blob to preprocess for, data : (H' x W' x K) ndarray and it returns: caffe_in : (K x H x W) ndarray for input to a Net
It is possible to write own functions I suppose but it seems Transformer could work in batches and I would prefer to follow Caffe standard for this experiment. |