ChainRulesCore.jl icon indicating copy to clipboard operation
ChainRulesCore.jl copied to clipboard

Jacobians

Open willtebbutt opened this issue 6 years ago • 4 comments

Sometimes you actually do want the jacobian of a function. If this function is a vector->vector function, the Jacobian is a matrix. It's not immediately obvious how to define the jacobian for, say, a function that accepts a struct and returns a struct. It would be nice to figure out some sensible conventions here.

willtebbutt avatar Nov 18 '19 12:11 willtebbutt

A Wirtinger is a flavour of Jacobian, no?

oxinabox avatar Nov 18 '19 15:11 oxinabox

Somewhere on Zygote there was an issue about this written up by @Roger-luo I am going to end up solving this in the next few weeks. It will be interesting to look back at the solution I end up with and what our past thoughts were.

oxinabox avatar Feb 22 '23 12:02 oxinabox

A Wirtinger is a flavour of Jacobian, no?

It's the Jacobian with a change of basis (under the constraint that the function is holomorphic).

sethaxen avatar Feb 22 '23 14:02 sethaxen

There are so many examples on here, discourse, and Zygote docs where someone writes the Wirtinger derivative in terms of frule and rrule (e.g. https://fluxml.ai/Zygote.jl/stable/complex/). Might be worth including it for completeness in https://juliadiff.org/ChainRulesCore.jl/dev/maths/complex.html

sethaxen avatar Feb 22 '23 14:02 sethaxen