Class weights for weighted cross entropy loss

53 views
Skip to first unread message

Aakash Kumar Nain

unread,
Nov 27, 2018, 12:58:58 PM11/27/18
to Keras-users
Hi,

I am a little confused about how the `class weights` thing is implemented in the source code. When we pass a dictionary of class weights, as per the source code, first the dictionary is passed to the `_standardize_user_data()` function is called which returns a list of class weights. After this, I wasn't able to get how the mask from this list is generated
and how it is applied to the final cross_entropy function. Can someone please elaborate on this?


 but this seems to penalize the loss in a different way. Can someone please confirm and if possible, provide a little code for the same? 



Regards,
Aakash Nain
Reply all
Reply to author
Forward
0 new messages