SciML / SciMLSensitivity.jl

A component of the DiffEq ecosystem for enabling sensitivity analysis for scientific machine learning (SciML). Optimize-then-discretize, discretize-then-optimize, adjoint methods, and more for ODEs, SDEs, DDEs, DAEs, etc.
https://docs.sciml.ai/SciMLSensitivity/stable/
Other
330 stars 70 forks source link

backsolve for gradients #72

Closed ChrisRackauckas closed 4 years ago

ChrisRackauckas commented 5 years ago

It would be nice to have a backsolve function which is like solve but has the adjoints already setup with Zygote.jl, where it runs a choice gradient calculation when Zygote is used. We can set it up so that way it uses forward-mode automatically when it makes sense, switches to adjoint sensitivity analysis in the cases that are applicable (i.e. currently ODEs), and then falls back to pure Zygote reverse-mode in the case where length(p) >> length(u0). Of course, then there can just be a mode overload or something like that so you can pass down all of the requested SensitivityAlg args to override the choice, and then we should get this setup in the DiffEqParamEstim/DiffEqBayes to make all of the gradients efficient.

ChrisRackauckas commented 4 years ago

backsolve is concrete_solve. Cheers.