Passing additional arguments to `odeint` from `torchdiffeq` to solve an IVP

Viewed 16

In Python I use the package torchdiffeq (as provided here) to solve initial value problems. Given an arbitrary function f(y, t, omega), I am wondering how to pass this additional argument omega to the odeint solver? From the documentation, I see that I can specify options such as the step_size, but I can't figure out how to pass additional arguments that are not the function y itself or the time vector t. Basically, something like

sol = odeint(f, x0, t, method='euler', args=(omega)).

Does any use torchdiffeq on a regular basis and can help me out here?

0 Answers
Related