facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

How to deal with class imbalance? #1268

Open agostbiro opened 7 years ago

agostbiro commented 7 years ago

Hi,

I have an image classification problem with high class imbalance. In the original Caffe framework, there is an InfogainLossLayer that can be used to offset the class imbalance while training. I can't seem to find this layer in the Caffe 2 docs.

Is something similar available in Caffe 2 or is there an other way of tackling class imbalance short of implementing a custom loss layer? Also, if I have a Caffe 1 model containing an InfogainLossLayer, I assume I can't convert that to Caffe 2, right?

Thanks, Agost

JosephKJ commented 6 years ago

It would be great if someone could help us on this. Waiting for the same answer!

krumo commented 6 years ago

I'm also interested in the solution of this problem. Is there anybody would like to share some ideas?