umbertogriffo / focal-loss-keras

Binary and Categorical Focal loss implementation in Keras.
278 stars 67 forks source link

In the loss, shouldn't it be 1-y_pred ? #3

Closed margokhokhlova closed 3 years ago

margokhokhlova commented 5 years ago

I am not sure, but I think there might be an error here:
pt_1 = array_ops.where(y_true > 0, y_pred, tf.ones_like(y_pred)) pt_0 =array_ops.where(y_true == 0, 1-y_pred, tf.zeros_like(y_pred))

umbertogriffo commented 4 years ago

Hi @margokhokhlova, I didn't get the problem you raise. Could you explain to me well?