Following are the input layers of my fine-tuned model:
layer {
type: "HDF5Data"
name: "data"
top: "Meta"
hdf5_data_param {
source: "/path/to/train.txt"
batch_size: 50
}
include { phase: TRAIN }
}
layer {
name: "data"
type: "ImageData"
top: "X"
top: "Labels"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 227
mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
}
image_data_param {
source: "/path/to/train.txt"
batch_size: 50
new_height: 256
new_width: 256
}
}
layer {
type: "HDF5Data"
name: "data"
top: "Meta"
hdf5_data_param {
source: "/path/to/val.txt"
batch_size: 50
}
include { phase: TEST }
}
layer {
name: "data"
type: "ImageData"
top: "X"
top: "Labels"
include {
phase: TEST
}
transform_param {
mirror: false
crop_size: 227
mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
}
image_data_param {
source: "/path/to/val.txt"
batch_size: 50
new_height: 256
new_width: 256
}
}
As you can see it has one imagedata input layer and 1 hdf5 input layer, if there was only 1 type of layer say imagedata, I could have done:
input_data = {prepare_images(im)}; # dimension 227*227*3*10
and then
scores = caffe('forward',input_data);
But here I have to give two types of input data, how can I do this? Please help!