@@ -103,16 +103,16 @@ end
103
103
T = typeof (Tag (f, eltype (x)))
104
104
ydual = static_dual_eval (T, f, x)
105
105
result = DiffResults. jacobian! (result, extract_jacobian (T, ydual, x))
106
- result = DiffResults. value! (d -> value (T,d ), result, ydual)
106
+ result = DiffResults. value! (Base . Fix1 (value, T ), result, ydual)
107
107
return result
108
108
end
109
109
110
110
# Hessian
111
- ForwardDiff. hessian (f:: F , x:: StaticArray ) where {F} = jacobian (y -> gradient (f, y ), x)
111
+ ForwardDiff. hessian (f:: F , x:: StaticArray ) where {F} = jacobian (Base . Fix1 (gradient, f ), x)
112
112
ForwardDiff. hessian (f:: F , x:: StaticArray , cfg:: HessianConfig ) where {F} = hessian (f, x)
113
113
ForwardDiff. hessian (f:: F , x:: StaticArray , cfg:: HessianConfig , :: Val ) where {F} = hessian (f, x)
114
114
115
- ForwardDiff. hessian! (result:: AbstractArray , f:: F , x:: StaticArray ) where {F} = jacobian! (result, y -> gradient (f, y ), x)
115
+ ForwardDiff. hessian! (result:: AbstractArray , f:: F , x:: StaticArray ) where {F} = jacobian! (result, Base . Fix1 (gradient, f ), x)
116
116
117
117
ForwardDiff. hessian! (result:: MutableDiffResult , f:: F , x:: StaticArray ) where {F} = hessian! (result, f, x, HessianConfig (f, result, x))
118
118
0 commit comments