How to implement my own weighted loss function in Keras?

mariOn report abuse

Hi, forum. I would like to know how to add custom weights for the loss function in a binary or multiclass classifier in Keras. I am using binarycrossentropy or sparsecategorical_crossentropy, based on my model. And I want to be able to choose what weight to give incorrect predictions for each class.

Add Answer

Need support?

Just drop us an email to ... Show more