Why do you say "K.binary_crossentropy is helpful to avoid exp overflow"?
yiyang186 opened this issue · comments
yiyang commented
Line 398 in e6598d1
# K.binary_crossentropy is helpful to avoid exp overflow.
xy_loss = object_mask * box_loss_scale * K.binary_crossentropy(raw_true_xy, raw_pred[...,0:2], from_logits=True)
wh_loss = object_mask * box_loss_scale * 0.5 * K.square(raw_true_wh-raw_pred[...,2:4])
You add square loss for wh, I think that is a good job really.
But I don't understand why it also need to add binary_crossentropy loss for xy.
xy = sigmoid(raw_xy)
I think xy con not overflow.