You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Julia 1.5 and earlier, complex dual numbers did not work well. This leads to the following interaction between the log(complex(x))) in the rrule for ^, and Zygote's forward-over-reverse Hessian calculation:
julia> hessian(x -> x[1]^x[2], [3,4])
ERROR: StackOverflowError:
Stacktrace:
[1] Complex at ./complex.jl:12 [inlined] (repeats 2 times)
[2] float at ./complex.jl:1016 [inlined]
[3] log(::Complex{ForwardDiff.Dual{Nothing,Float64,2}}) at ./complex.jl:583 (repeats 79984 times)
It did not happen prior to #513 (v1.11.4) because this rule had a different special case for real x and real p, which I think got some of the edge cases wrong. Perhaps we could do both. But I'm not sure how much work is justified in fixing this. Found in CI & avoided here.
The text was updated successfully, but these errors were encountered:
maybe we could check if Julia is VERSION < v"1.6" and then do the bad thing that might get some edge cases wrong, just so we can avoid making Zygote's CI for 1.3 and 1.5 fail.
In Julia 1.5 and earlier, complex dual numbers did not work well. This leads to the following interaction between the
log(complex(x)))
in therrule
for^
, and Zygote's forward-over-reverse Hessian calculation:It did not happen prior to #513 (v1.11.4) because this rule had a different special case for real
x
and realp
, which I think got some of the edge cases wrong. Perhaps we could do both. But I'm not sure how much work is justified in fixing this. Found in CI & avoided here.The text was updated successfully, but these errors were encountered: