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
This can be triggered also using the ForwardDiff API:
julia> ForwardDiff.derivative(log ∘ zero, 1.0)
0.0
julia>f(x) =log(zero(x[1]) + x[2])
f (generic function with 1 method)
julia> ForwardDiff.gradient(f, [1.0, 0.0])
2-element Vector{Float64}:NaNInf
The problem is that NaN-safe mode checks whether ALL partials are zero whereas actually it should be applied for each zero partial. Thus one can work around the issue by enforcing that there's only one partial:
Activity