-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Hessian of x-> dot(x,H,x) should be H+H', not zero #551
Comments
Notice that if you give slightly nonzero arguments, you get different results:
So |
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Nov 2, 2021
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Nov 2, 2021
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Nov 9, 2021
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Apr 23, 2022
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Apr 24, 2022
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
May 16, 2022
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
May 31, 2022
mcabbott
added a commit
to mcabbott/ForwardDiff.jl
that referenced
this issue
Aug 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
ForwardDiff incorrectly computes the Hessian of three-argument-dot.
Cook up some (any) square matrix
julia> H = [1 2 3; 4 5 6; 7 8 9];
Compute Hessian of three-argument dot. Yields all zeros. Should yield H+H'.
julia> ForwardDiff.hessian(x->dot(x,H,x), zeros(3))
3×3 Array{Float64,2}:
0.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 0.0
Manually expand that three argument dot call. Now result is the expected H+H':
julia> ForwardDiff.hessian(x->x'H*x, zeros(3))
3×3 Array{Float64,2}:
2.0 6.0 10.0
6.0 10.0 14.0
10.0 14.0 18.0
Curious!
Cheers,
Wouter
The text was updated successfully, but these errors were encountered: