Open onimonipea opened 4 years ago
In unet_model.py the loss function is created as follows:
def weighted_binary_crossentropy(y_true, y_pred):
class_loglosses = K.mean(K.binary_crossentropy(y_true, y_pred), axis=[0, 1, 2])
return K.sum(class_loglosses * K.constant(class_weights))
There is no description of how CLASS_WEIGHTS are created. I am attempting to use this on my own data, for segmentation, but I believe I am running into loss function issues because of incorrect class weights.