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
Seems like it's caused by the sqrt() (on the sum of squared real and imaginary parts).
Fixed by adding a small offset:
abs_(x::Complex) = sqrt(real(x) ^ 2 + imag(x) ^ 2 + 1f-12)
using Zygote
x = [0f0 + 1im * 0f0]
f(x) = sum(abs.(x))
f'(x)
result:
1-element Vector{ComplexF32}:
NaN32 + NaN32*im
The text was updated successfully, but these errors were encountered: