1
votes

I want to feed caffe vectors of labels (multi label regression problem), so I have used the following link for creating hdf5 files.
Using this code, I created an image_list.txt which contains path of files and float labels in each line, e.g.

/home/deep/00000.bmp  0.9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.0096 -0.0586 0.9982 -0.0046 0.1084 0.3938

but it seems that it only works for integer label.
when I run demo.m the following error comes:

Error using dataread
Trouble reading integer from file (row 1, field 3) ==> .9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.

1
have you considered this answer? - Shai
@Shai the link you mentioned is about integer labeles not float. - RahimEnt
the link I sent is on how to create hdf5 data from MATLAB to be used by caffe - Shai

1 Answers

0
votes

If you also use caffe's C++ interface, I would like to share you with this Multitask DataLayer and it supports float typed label vector for regression tasks. Here provides a simple example for learning facial expressions' label distribution which is a vector size of 8.