question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support reverse time integration with ODE.

See original GitHub issue

We are trying to implement the Neural ODE paper as part of the JAX/FLAX Community Week at Hugging Face. While trying to implement the Continuous Normalizing Flow part of the paper we realized we have to run the ODE solver reversed in time.

This feature is not supported by the current odeint in jax.experimental.ode. In contrast this feature is supported in scipy and torchdiffeq.

It would be great if this feature is supported in the jax.experimental.ode.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mattjjcommented, Jul 13, 2021

More concretely, I think odeint(f, x0, t), where t has monotonically decreasing values, would produce the same values as odeint(lambda x, t: -f(x, -t), x0, -t), where in this call the time values are monotonically increasing. I didn’t work out the change-of-variable argument, so that claim may be buggy, but something like that should work.

0reactions
mandelbrot-walkercommented, Jul 22, 2021

@jatentaki you can find a working CNF here by @sw32-seo .

Read more comments on GitHub >

github_iconTop Results From Across the Web

ODE initial conditions and integrating backwards in time
We often do integrate backwards as well as forwards. However, in applications it's more common to know where you're starting rather than ...
Read more >
Time-Reversal Symmetric ODE Network - NIPS papers
In this paper, we propose a novel loss function that measures how well our ordinary differential equation (ODE) networks comply with this time-reversal...
Read more >
Solving ODE's backwards in time
Hello all, I would like to solve some ODE's backwards in time because. I know the final values, not the initial values. For...
Read more >
How can I solve a second order ODE backwards in simulink or ...
So i know that at time t1 sy=0 and sx is some value sE. Which method do I use for this kind of...
Read more >
How to integrate backwards using Integrator Interface #538
I am solving differential equations. My goal is to set a tspan and find a solution value before the first time stamp.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found