dual2nd grad -nan issue #300
Closed
Manushanker
started this conversation in
General
Replies: 1 comment 7 replies
-
I used the function 'isnan' to identify the dual2nd variables with val.grad, grad.val, grad.grad equal to nan and forced their value to be zero, then the library computes the correct Jacobian and Hessian values. I still would like to know why the val.grad becomes nan even though the value of the variable is not nan. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI Allan,
I am computing a Hessian using the dual2nd forward type. The computed Jacobian and Hessian are all nan. When I debugged the code I found that for certain dual2nd variable it has grad (under val) to be -nan(ind) and val and grad under grad is also -nan(ind). Can you please let me know what is the reason for nan? If need I can share you my code.
Thanks,
Manushanker
Beta Was this translation helpful? Give feedback.
All reactions