Closed tmigot closed 7 months ago
If you use partition by rows then you're setting up the coloring for reverse, not forward, differentiation.
If you use partition by rows then you're setting up the coloring for reverse, not forward, differentiation.
Sorry, I forgot this. Is there a way to compute the Jacobian in reverse mode?
Yes, you just have to define the pullback vectors by the color vectors. We should make a higher level API on that like we did for forward mode, but it's just Zygote.pullback(f,u)[2](colors .== i)
for each i
(and don't redo the pushforward though, etc.)
We can close this now
I want to compute the Jacobian matrix of
c!
atx0
and tried to use thepartition_by_rows
option when computing the coloration of the Jacobian matrix as followsbut got the following error
I also tried
but then get an error when computing the jacobian with
forwarddiff_color_jacobian!
.