ChainRules.jl
ChainRules.jl copied to clipboard
Are the Factorization rules correct for Complex inputs?
I see in https://github.com/JuliaDiff/ChainRules.jl/blob/master/src/rulesets/LinearAlgebra/factorization.jl
we use a fair bit of A' which is adjoint.
In other places @simeonschaub has said we need to not use that, and to use transpose instread,
so we don't recursively conjugate the complex numbers
We should now be able to check the complex case with FiniteDifferences. But right now, most of our LinearAlgebra rules are restricted to real numbers anyways, so we could also just restrict these to reals for now and worry about this later.
Sounds reasonable. They almost certainly weren't written with complex-valued inputs in mind. Probably makes sense to restrict the types of the inputs to be real-valued unless we're really lucky and the adjoints generalise immediately to complex numbers.
Related reference for SVDs of complex-valued matrices: https://arxiv.org/abs/1909.02659