torchdiffeq icon indicating copy to clipboard operation
torchdiffeq copied to clipboard

Question: how to implement a non-autonomous neural ode?

Open cyx96 opened this issue 5 years ago • 1 comments

I basically want to implement a non-autonomous neural ode model. The closest one I can find is described in this paper: "Time Dependence in Non-Autonomous Neural ODEs" (https://arxiv.org/pdf/2005.01906.pdf). However their model looks like a ResNet-variant to me rather than a neural ode rolled out from an ode solver. So I'm wondering if I can implement such non-autonomous neural ode models using torchdiffeq library. But the amount of work seems intimidating to me since I'm not very familiar with all those ode solvers. I would really appreciate it if the developers of this wonderful library could offer any suggestions.

cyx96 avatar Dec 25 '20 03:12 cyx96

We allow dependence of the vector field on a time variable. See this example of a conv layer depending on t, https://github.com/rtqichen/torchdiffeq/blob/master/examples/odenet_mnist.py#L76.

Examples of more complex dependencies on t can be found in https://github.com/rtqichen/ffjord/blob/master/lib/layers/diffeq_layers/basic.py.

rtqichen avatar Jan 06 '21 18:01 rtqichen