torchdiffeq
torchdiffeq copied to clipboard
Perform one integration step
I am looking forward to using some of the solvers in this repo. Thank you for your work!
I am porting a code from Scipy to Pytorch. I have an ODE with time-varying coefficients so I cannot solve the equation in one go, but I'd need to perform a step-by-step integration. In Scipy, I am using the RK45's step
method. Is there something equivalent in torchdiffeq
I could use?
The current API isn't designed with this mind unfortunately. The only way to implement it is to use the internal functions. The equivalent to the step
method is the _advance
method: https://github.com/rtqichen/torchdiffeq/blob/master/torchdiffeq/_impl/solvers.py#L34.