-
Notifications
You must be signed in to change notification settings - Fork 532
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
Exploding gradient problem #47
Comments
@scarmaten have you tried smaller learning rates? |
yup i have tried it with learning rate all the way till 1e-20. still no luck. |
Hi @scarmaten , one possible way to debug is use a very small, verified dataset as both train and val data to train overfitted models. If you can get a overfitted model with 100% (or almost) accuracy, that means the architecture and system is fine, and the problem might be the data. Otherwise, there is something wrong in the system design. |
I have also come across exploding gradient problem when trying to use mobilenet v2 ssd on Widerface. I am able to bisect the problem to the smooth L1 loss at pytorch-ssd/vision/nn/multibox_loss.py Line 45 in 1e86eb3
I suspect it is caused by no default boxes matched. After changing torch.nn.functional.smooth_l1_loss( reduction='sum'), problem is solved. |
The question then arise, should I adjust the prior boxes for my specific purposes, or just let it go?(As it is kind of working now) |
I have tried training on open image dataset but i kept getting exploding gradient with the bounding box after 1 epoch

Any ideas on how to fix them?
The text was updated successfully, but these errors were encountered: