Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making forward function different than backward function #231

Open
orodrigoaraizabravo opened this issue Apr 26, 2023 · 0 comments
Open

Comments

@orodrigoaraizabravo
Copy link

More than an issue, this is a question/request. In my lab, we are working with physical systems for which the forward pass can be computed in the physical system, but the backward pass must be computed in a computer that has an approximate model of the physical system (and hence can be back-propagated).

For testing this for small physical system sizes, I was imagining that one would use a full simulation of the system to go forward with no gradient by calling in on odeint on func_physical, a function that represents the ODEs of the physical system with no approximations. This would tell us the trajectory as dictated by the actual physical system. I want to then feed that trajectory to go backwards via the adjoint_method. However, I would like to have the adjoint_method call odeint with a new func_model, a function that represents the APPROXIMATE ODEs of the physical system.

I was wondering if there's an easy way to do this using torchdiffeq? Again, this would be very useful for the physical ML community that may want to use Neural ODEs.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant