balance batch caffe

26 views
Skip to first unread message

olfa mzoughi

unread,
Jul 22, 2018, 9:09:47 AM7/22/18
to Caffe Users
Dear caffe users,

Have you an idea how to balance batch in caffe.

I am working with imbalanced binary trainining data set and I want to test training with balanced class samples known that the number of positive examples is much lower than negative examples.

Thank you in advance



Przemek D

unread,
Aug 22, 2018, 11:24:54 AM8/22/18
to Caffe Users
It won't be trivial to make the batches balanced - you'd probably have to use BatchReindex layer in some clever way but I've never done anything like that.
AFAIK, the usual way to deal with imbalanced classes is to introduce weights on the loss function level, and the tool to do it is InfogainLoss layer. I recommend reading the Doxygen documentation on this one.
Reply all
Reply to author
Forward
0 new messages