Giter VIP home page Giter VIP logo

Comments (4)

jacobjinkelly avatar jacobjinkelly commented on August 25, 2024

Thanks! Currently the adjoint method is only implemented for dopri5 adaptive and rk4 fixed-grid here. We found these solvers to be the fastest in wall-clock time, so these were the only solvers we used during training (hence the only ones we implemented a backward pass for via the adjoint method).

The adjoint method hooks into JAX's AD via defvjp (you can have a look at the JAX docs and code for custom_vjp, defvjp). I would recommend looking at how the adjoint is defined for _dopri5_odeint using _odeint_fwd and _odeint_rev as an example to go off of. The only change you need to make to define the adjoint for different solvers is to defvjp using a fwd and bwd function which calls the appropriate solver. In fact, you can use different solvers for the forward and backward pass if you wanted to!

Let me know if that makes sense, or anything else I can help with.

from easy-neural-ode.

ibulu avatar ibulu commented on August 25, 2024

sounds good. I just tried the odeint_grid function. it is returning a solution only at two time points regardless of t.

from easy-neural-ode.

jacobjinkelly avatar jacobjinkelly commented on August 25, 2024

Yes, unfortunately it's a bit trickier to create a grid for multiple time points. An implementation is in torchdiffeq but I wasn't able to port it to JAX.

from easy-neural-ode.

ibulu avatar ibulu commented on August 25, 2024

ohh no worries. I should have read the source code mode carefuly

from easy-neural-ode.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.