From e20b43561f6cb73f2d4228f8f5232bd3dbed54dc Mon Sep 17 00:00:00 2001 From: Adrian Seyboldt Date: Fri, 18 Nov 2022 09:06:58 -0600 Subject: [PATCH] Fix aesaraf hessian function --- pymc/aesaraf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymc/aesaraf.py b/pymc/aesaraf.py index 37aba7402e7..3b30b76628a 100644 --- a/pymc/aesaraf.py +++ b/pymc/aesaraf.py @@ -518,7 +518,7 @@ def grad_ii(i, f, x): @aesara.config.change_flags(compute_test_value="ignore") def hessian(f, vars=None): - return -jacobian(gradient(f, vars), vars) + return jacobian(gradient(f, vars), vars) @aesara.config.change_flags(compute_test_value="ignore") @@ -538,7 +538,7 @@ def hessian_diag(f, vars=None): vars = cont_inputs(f) if vars: - return -at.concatenate([hessian_diag1(f, v) for v in vars], axis=0) + return at.concatenate([hessian_diag1(f, v) for v in vars], axis=0) else: return empty_gradient