ForwardDiff.jl icon indicating copy to clipboard operation
ForwardDiff.jl copied to clipboard

Efficient partial Hessian calculation

Open salbert83 opened this issue 6 years ago • 0 comments

Suppose I have a function F(x,y) of two variables x and y where dim(x) << dim(y). What is the most efficient way to calculate both ForwardDiff.jacobian(w1 -> ForwardDiff.gradient(w2 -> F(w2, y), w1), x) and ForwardDiff.jacobian(z -> ForwardDiff.gradient(w -> F(w, z), x),y)? These work, but I'm wondering if there's something faster. I think ForwardDiff.hessian would be way to expensive since I have no need for the second derivative w.r.t. y. I just need the partials \nabla_xxF and \nabla_xyF. Thanks!

salbert83 avatar Aug 04 '18 03:08 salbert83