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
as the error says, autograd requires scalar valued functions, and df is not. To obtain the hessian for your example you can use
julia> g=grad(f)
(::gradfun) (generic function with 1 method)
julia>ddf(w)= [grad(x->g(x)[1])(w) grad(x->g(x)[2])(w)]
ddf (generic function with 1 method)
julia>ddf(w)
2×2 Array{Int64,2}:2002
Does not it have to be the solution [ [2 0] [0 2] ] ?
The text was updated successfully, but these errors were encountered: