Since sigmoided values are bound between 0 to 1, and mselosses are usually larger than that. I’m assuming the loss values tends to be unbalanced. The question is, do we need to make special adjustments (weight balancing) when adding these different type of losses together? If there is, is there any general rules of thumb?
loss_x, loss_y, loss_w, loss_h is using squared-sum error. loss_conf, loss_cls is using binary logistic-loss error
And my loss function is just adding them together.
I’m asking this because I have been trying to re-implement training part of YoloV3 at https://github.com/ydixon/yolo_v3. But my model is not converging so well on the COCO dataset. I’ve been trying to determine whether the problem is with the loss function/augmentations/hyperparameters.
You could, but most likely you’ll need to run a debugger to check if the separate losses are of different scale. Check here in lesson 9. But I don’t see any scaling carried out by the author in the codes from the link you provided.
I’m the author of that repo actually :). I’ve set up the lambda / (obj/noobj)scale values so I can tinker around with different parameters although they are all value of 1s right now. Thanks for the lesson 9 link. I guess one strategy would be just looking at the values and try to make good guesses.
I think scales are removed (or all set to 1s) when moving from YoloV2 to YoloV3. I’m going to start studying the C code (lack of practice) once I have things set up, but I figured I should try troubleshooting the problem before comparing it with the actual answer itself.
Could it be that maybe Focal Loss got rid of the need to scale the different losses in YoloV3. ?
Edit: Nay, that’s for binary cross-entropy losses. Pls ignore