Skip to content

Define the custom adjoint on a more general ArrayPartition constructor - #119

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
martenlienen:array-partition-adjoint
Dec 21, 2020
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
martenlienen:array-partition-adjoint

Conversation

@martenlienen

Copy link
Copy Markdown
Contributor

Computing the adjoint of a SecondOrderODEProblem requires an adjoint for this constructor because of the following line.

https://github.com/SciML/DiffEqBase.jl/blob/9f0875ad24ac9c2f5784b242eba5344807f278e7/src/problems/ode_problems.jl#L153

This PR depends on FluxML/ZygoteRules.jl#12 because of the anonymous value type argument. That was a fun one to debug :)

@ChrisRackauckas

Copy link
Copy Markdown
Member

Thanks!

@ChrisRackauckas

Copy link
Copy Markdown
Member

https://travis-ci.org/github/SciML/RecursiveArrayTools.jl/builds/740939125#L439 looks like it needs to hit the 3 argument version.

@martenlienen

Copy link
Copy Markdown
Contributor Author

No, this error is the reason why the other PR needs to be merged first. At the moment, the generated ZygoteRules._pullback passes the second argument wrongly to ZygoteRules.adjoint (the Type{Type{...}} construct in the error message).

@martenlienen
martenlienen force-pushed the array-partition-adjoint branch from 04d6eb6 to 8c60597 Compare December 21, 2020 09:08
@martenlienen

Copy link
Copy Markdown
Contributor Author

Now that v0.2.1 of ZygoteRules has been released, this PR is ready to be merged as well.

@ChrisRackauckas
ChrisRackauckas merged commit a59fe8a into SciML:master Dec 21, 2020
@martenlienen
martenlienen deleted the array-partition-adjoint branch December 21, 2020 14:37
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

Successfully merging this pull request may close these issues.

2 participants