I wish to train AlexNet with Cross Entropy Loss, for which every input has multiple label probabilities. Till now, I have been doing this using an HDF5 layer. However, one has to do all sorts of manual pre processing and access to this layer is around twice as slow as that to lmdb.
In view of the above, I wish to know how can one train for a multi label loss using an lmdb layer in caffe. More precisely, what should be done in train.txt so that one can specify multiple labels for a given image ?
Correct me if I'm wrong, but I think that the easiest way is to create one LMDB file to store the images and a HDF5 file to store the labels. Of course the images should be ordered in the same way in both LMDB and HDF5 files. The input data to train the net should be taken from the LMDB file and the labels to compute loss should be the ones stored in the HDF5 file.