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
I'm yet able to fit a vector model, that is model(x, p) returns an array of dimensions (2, N), where N is the dimension of the x data points. I'm yet using forward differentiation ad a numerical computed Jacobian
Now I want to use geodesic acceleration to see if I can increase the accuracy. Taking the example in the Readme file, in which they calculate the hessian with hessian(z->model(in_data[i], z),p), I needed first to define the hessian of a vector function, which, following this issue, can be defined as
functionvector_hessian(f, x)
n =length(x)
out = ForwardDiff.jacobian(x -> ForwardDiff.jacobian(f, x), x)
returnreshape(out, n, n, 2) # here 2 is the dimension that my function returns since I calculate the hessian(z->model(in_data[i], z),p)end
However, if I declare my Avv! function with this 'vectorized' hessian, it gives me the error
MethodError: no method matching *(::Matrix{Float64}, ::Array{Float64, 3})
since my hessian is not a Matrix anymore.
Is there any way to make this simple extension work?
The text was updated successfully, but these errors were encountered:
Hello,
I'm yet able to fit a vector model, that is
model(x, p)
returns an array of dimensions (2, N), where N is the dimension of the x data points. I'm yet using forward differentiation ad a numerical computed Jacobianand it fits very well.
Now I want to use geodesic acceleration to see if I can increase the accuracy. Taking the example in the Readme file, in which they calculate the hessian with
hessian(z->model(in_data[i], z),p)
, I needed first to define the hessian of a vector function, which, following this issue, can be defined asHowever, if I declare my
Avv!
function with this 'vectorized' hessian, it gives me the errorsince my hessian is not a Matrix anymore.
Is there any way to make this simple extension work?
The text was updated successfully, but these errors were encountered: