Skip to content

Neural ODEs with non-uniform time intervals #146

Answered by drgona
jalving asked this question in Q&A
Discussion options

You must be logged in to vote

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:

class EulerVT(Integrator):
    def __init__(self, block):
        """
        Euler integrator with timestep as control input
        """
        super().__init__(block=block, interp_u=None, h=1.0)

def integrate(self, x, h, *args):
        k1 = self.block(*[x, *args]…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jalving
Comment options

Answer selected by drgona
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants