Fix gradients for parameters getting dropped #1180
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Needs SciML/SciMLBase.jl#979 and
potentially a change in DifEqBase to passsensealgin the kwargs in https://github.com/SciML/DiffEqBase.jl/blob/0874ff4ef8df2c74c843ce534e64ab3cdd40efb4/src/solve.jl#L1126Currently UDEs fail to converge with reverse mode. This is due to dropped gradients for the parameters while solving the adjoint problem. We also definitely need to reduce the number of places where the assumptions SciML adjoints makes differs from the underlying AD. An example is returning the
Vector{Vector{Float64}}as the gradient for asolobject instead of theTangentorNamedTuple(like in Zygote) for the struct we are calculating gradients for.Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.