Using evalJacobianAndHessian helper for variables larger than 3 #34
Replies: 2 comments 4 replies
-
Hi @MaxSagebaum As mentioned in my previous comment the "evalJacobianAndHessian" helper when using the "HessianComputationType" computes Hessian and jacobian matrix up to four variables. Can you please let me know how to compute the derivatives when the number of variables is greater than 4? Here is my code } Thanks, Manushanker |
Beta Was this translation helpful? Give feedback.
-
Thanks for looking at my code. Yes, I want to avoid calling derivative function multiple times. As you suggested, I am using the TapeHelper to compute the Jacobian and Hessian. I am currently facing runtime errors and trying to resolve it. Will update you its status once I resolve it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @MaxSagebaum
I am using the EH::evalJacobianAndHessian helper to compute the Jacobian and Hessian of a user defined function and the code works perfectly when the number of variables is 3. I would like to extend it for arbitrary number of variables. In the documentation it is mentioned that the default size of the "HessianComputationType" is 4 and so, I modified the hessianComputationType as "using codi::EvaluationHelper::HessianComputationType = RealForwardGen<RealForwardVec<5>, Direction<RealForwardVec<5>, 5> >" in evaluationHelper.hpp file but faced runtime errors. Can you please let me know how to use the evalJacodianHessian helper for variables greater than three.
Thanks,
Manushanker
Beta Was this translation helpful? Give feedback.
All reactions