Single Label Regression(Finetuning) With Input Artificial Features In Caffe

50 views
Skip to first unread message

Devendra Mandan

unread,
Jan 3, 2016, 12:27:31 PM1/3/16
to Caffe Users

I have n images(say) and for each of them I have 2 artificial(made-up) features, and image-labels are single dimensional integers. I want to fine-tune Image-net on my dataset, but I do not know how to handle these 2 additional features as input, how should I feed the data to caffe? Please help!


EDIT: The 2 features can be any 2 numbers (1 dimensional) say two numbers representing what class an image falls into, and the second being, how many images fall into that class.

Say, I have 'cat.jpg', then the features are say, 5 and 2000, where 5 is the feature 1 representing the class and 2000 is the total images in that class. In short, the 2 features can be any two integers.

Neil Nelson

unread,
Jan 3, 2016, 1:48:12 PM1/3/16
to Caffe Users
Commonly the labels or classes are not features and are separate from the data. See the tutorials on how those two areas are configured. The number of images you have in a class would not seem to be useful as input to the neural network where the goal, unless you have something different in mind and need to let us know, is to predict the class from an image. Having a sufficient number of images for each class and perhaps to some degree that those counts are balanced, that there are not extreme counts either way for the images in a class is something to consider but those counts are not commonly input to the neural network.

Devendra Mandan

unread,
Jan 3, 2016, 2:20:06 PM1/3/16
to Caffe Users
That was just intended as an example, to make the question more comprehensible, for the sake of simplicity lets just assume that two n*1 features are present with the images as input, how should I give them as input to caffe? I read somewhere that I would have to use the concatenation layer, but I am not sure.

Neil Nelson

unread,
Jan 3, 2016, 4:36:35 PM1/3/16
to Caffe Users
Do a search on 'concatenation' in Caffe Users.

Here is one that may work

https://groups.google.com/forum/#!searchin/caffe-users/concatenation/caffe-users/U_aibtsgo5I/1FNQVZlaFAAJ

The posts by Evan Shelhamer tend to be very good.
Reply all
Reply to author
Forward
0 new messages