-
Notifications
You must be signed in to change notification settings - Fork 909
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
how to avoid underflow in dt in dopri5? #27
Comments
This is a problem of the ODE becoming stiff, essentially acting too erratic in a region and the step size becomes so close to zero that no progress can be made in the solver. We were able to avoid this with regularization such as weight decay and using "nice" activation functions, but YMMV. Another option is to use a fixed step size solver to get an approximate solution. |
I got the same error unfortunately. How can I use a fixed step size solver to get an approximate solution? Can you able to provide me some code about it? |
@HelenZhuE Adaptive-step:
Fixed-step:
|
@rtqichen I am experiencing the same issues. Can you be more precise on which activation functions are considered nice and why? I have tried using ReLU and Softplus and I get the error with both. Swapping the solver to 'rk4', solved the issue for me, however I am not sure how much performance I might lose because of this. Additionally, it might be worth noting that even with the nans, the model was working and learning. I was only able to notice a problem and the nans once I run within the torch.autograd.detect_anomaly() scope. Can anyone explain this? |
After some iterations, I see the
underflow in dt
exception coming fromdopri5.py
file. What should I look for in order to debug this problem?Thanks in advance.
The text was updated successfully, but these errors were encountered: