-
Greetings! I have been using Neuromancer to perform nonlinear system identification with considerable success. I am now interested in learning and using neural controlled ODEs with non-uniform control points which has led to a few questions about how the integrators work with respect to time rollouts.
Thanks for any clarification. This has been a great tool for my work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @jalving, Thanks for your interest in the library! As of now, our integrators support fixed timesteps for training NODEs. There are three ways you could implement NODE with variable timesteps in Neuromancer. Option 1: Modify existing integrators to take timestep as extra input instead of attribute h.
https://github.com/pnnl/neuromancer/blob/master/src/neuromancer/dynamics/integrators.py#L86 You would need to introduce a new input variable (lets label it by 'h') in your dataset that will provide the corresponding timestep values, then you can treat the integrator with this extra positional input 'h' for timestep together with control input 'u'. Something like:
Option 2: Modify torchdiffeq integrator to support the architecture you need. It can take irregularly sampled intervals, this is straightforward for systems without control inputs. However, for systems with controls you need to handle controls via interpolations. There is a related issue at torchdiffeq github repo that might be relevant: We used to have this interpolation supported via interp_u method in our integrators, but it was hard to maintain for all integrators and we deprecated this functionality. Option 3: For instance, lets take this example:
|
Beta Was this translation helpful? Give feedback.
Hi @jalving,
Thanks for your interest in the library! As of now, our integrators support fixed timesteps for training NODEs.
There are three ways you could implement NODE with variable timesteps in Neuromancer.
Option 1: Modify existing integrators to take timestep as extra input instead of attribute h.
This would require modifying the forward pass of the selected integrator. For instance, Euler would need to be modified as: