umbertogriffo/focal-loss-keras

Line 77 is unecessary

LihaoWang1991 opened this issue · 1 comments

Good code.

One little remark:

In line 77 a divisoin over sum is done, however this is unecessary since the input y_pred is already softmax, which means the sum of all elements is 1.

y_pred /= K.sum(y_pred, axis=-1, keepdims=True)

Hi @LihaoWang1991,
I think you are right!

Thanks!