Loss is incorrect for x,y
Closed this issue · 2 comments
In https://github.com/BobLiu20/YOLOv3_PyTorch/blob/master/nets/yolo_loss.py#L55 it should be mse loss and not bce loss
My bad, I didn't note, sigmoid was happening before that. The loss is in fact correct.
Hi @TheShadow29 , Would you mind elaborate more why BCE would be a better choice when sigmoid is applied?
My understanding is that sigmoid is always applied to tx and ty to ensure the restriction between 0 and 1, and MSE is applied after. Thus I was confused when you said BCE should be correct in this case
I might have hastily concluded that thinking it was similar to cross entropy. In another repository for Yolov3: https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/master/models.py#L195 they did use MSE.
I am not very sure which is more correct, but I think both produce a similar effect. Sorry for my hasty observations.