Ignore multiple labels in softmax loss

67 views
Skip to first unread message

klo...@vicomtech.org

unread,
Jan 4, 2018, 6:51:34 AM1/4/18
to Caffe Users
Hello,

Is it possible to ignore more than one label when computing the softmax loss using something like:

loss_param {
    normalize: true
    ignore_label: 1
    ignore_label: 2
  }

Thanks,

K

Przemek D

unread,
Jan 15, 2018, 6:00:36 AM1/15/18
to Caffe Users
Currently the SoftmaxWithLoss layer can only store one index of an ignored class.

Santiago Olivera

unread,
May 1, 2018, 2:05:05 PM5/1/18
to Caffe Users
How about now?

Przemek D

unread,
Aug 17, 2018, 9:15:45 AM8/17/18
to Caffe Users
I'm sorry, to my knowledge there aren't plans for such a niche feature. Personally, I'd suggest writing a Python layer for this purpose - just run a simple loop over your outputs, and replace the values you want to ignore by some ignored value. If you use numpy (example here) it should be sufficiently fast too.
Reply all
Reply to author
Forward
0 new messages