Open gdalle opened 3 months ago
Non deterministic outputs:
julia> using DifferentiationInterface
julia> import FiniteDiff
julia> backend = AutoFiniteDiff()
julia> f(x) = sum(abs2, x)
f (generic function with 1 method)
julia> hessian(f, backend, rand(3))
3×3 LinearAlgebra.Symmetric{Float64, Matrix{Float64}}:
2.0 1.86265e-9 0.0
1.86265e-9 2.0 0.0
0.0 0.0 2.0
julia> hvp(f, backend, rand(3), ones(3))
3-element Vector{Float64}:
2.5
2.0
2.0
julia> hvp(f, backend, rand(3), ones(3))
3-element Vector{Float64}:
1.0
1.0
1.0
julia> hvp(f, backend, rand(3), ones(3))
3-element Vector{Float64}:
1.5
2.0
1.5
Does it have to do with the finite difference mode chosen by default?