-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update loss.py #49
base: master
Are you sure you want to change the base?
Update loss.py #49
Conversation
Fix clc loss nan bug. Sum of cls_loss should divide total number of pos_neg
Good job |
@banjuanshua Have you successfully run the code? |
This is also giving nan loss how the above solution solve the problem can u explain |
For the best, you should also add clamp in the focal_loss in case the sigmoid produce
This should be better, where we could set |
Have you trained a satisfying model with your modification? In my case, dividing Also, other implementations below both uses |
what is the training cls loss when you use only num_pos as the normalizer? |
@twmht Sorry it's been a long time so I can't remember what exactly the value of that is. But I have confirmed with the authors of several other implementations, and it is correct to divide the cls loss by only num_pos. It is also the case in Facebook's Detectron2, so you can be assured to do so. However, according to my own experience, this repo may have some other subtle implementation errors so it is not guaranteed that you get desirable results with this repo. |
Fix clc loss nan bug. Sum of cls_loss should divide total number of pos_neg