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.36k stars 125 forks source link

Initialization #80

Closed pharringtonp19 closed 3 years ago

pharringtonp19 commented 3 years ago

This might be a bad question --

Is there a way to initialize the model/vector field so that if no training was performed, you would simply get the input as the output?

Zymrael commented 3 years ago

Hi @pharringtonp19. You can try initializing parameters of the last layer in DEFunc close to 0 (initializing all to 0 can be dangerous). This will make you vector field small everywhere i.e $\dot x$ close to zero, and the integral over your specified time domains also close to 0. In other words, your Neural ODE output will be also close to your initial condition.