Closed huanranchen closed 6 months ago
There is a min_step argument if you use any RK adaptive-step solver like the default dopri5
. https://github.com/rtqichen/torchdiffeq/blob/master/torchdiffeq/_impl/rk_common.py#L146
odeint(..., method="dopri5", options={"min_step": 0.01})
Depending on your application, it might be worth thinking more about how to model a less stiff ODE though (if that is a possibility).
Thanks a lot!
This error occurs since dt is too small. By setting "min_step": 0.01, it works!
There is a min_step argument if you use any RK adaptive-step solver like the default
dopri5
. https://github.com/rtqichen/torchdiffeq/blob/master/torchdiffeq/_impl/rk_common.py#L146odeint(..., method="dopri5", options={"min_step": 0.01})
Depending on your application, it might be worth thinking more about how to model a less stiff ODE though (if that is a possibility).
There is a min_step argument if you use any RK adaptive-step solver like the default
dopri5
. https://github.com/rtqichen/torchdiffeq/blob/master/torchdiffeq/_impl/rk_common.py#L146odeint(..., method="dopri5", options={"min_step": 0.01})
Depending on your application, it might be worth thinking more about how to model a less stiff ODE though (if that is a possibility).
But this version (enabling setting min_step) hasn't been updated on pip. If we use pip to install torchdiffeq, we still cannot set min_step.
Thanks for letting me know. Latest version has been updated on pip.
Hi, when using dopri5 algorithm, it sometimes occurs "underflow in dt nan". Could we set a upper bound and a lower bound for dt to avoid such problems?