DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.38k stars 128 forks source link

dopri5 and tsit5 overestimate error #164

Closed martenlienen closed 2 years ago

martenlienen commented 2 years ago

The error estimates of the dopri5 and tsit5 solvers do not consider the step width dt in the error estimate which leads to overestimates of the error (assuming dt < 1)

https://github.com/DiffEqML/torchdyn/blob/master/torchdyn/numerics/solvers/ode.py#L155

https://github.com/DiffEqML/torchdyn/blob/master/torchdyn/numerics/solvers/ode.py#L177

Zymrael commented 2 years ago

Thanks! #165 addresses this. We observe a small speedup across our benchmarks.