`value_and_hessian`?
#14146
-
Hi all, Is there an efficient way to get Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
jakevdp
Jan 25, 2023
Replies: 1 comment
-
Not directly; see #762 for related discussion. Fortunately, there's a good workaround in many cases: just compute the value and the hessian normally as separate statements, wrap the whole function with JIT, and rely on the compiler for deduplication of operations. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joglekara
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not directly; see #762 for related discussion. Fortunately, there's a good workaround in many cases: just compute the value and the hessian normally as separate statements, wrap the whole function with JIT, and rely on the compiler for deduplication of operations.