Skip to content

Commit

Permalink
Fix laplace hess test
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDuffield committed Feb 1, 2024
1 parent efaec57 commit 93cedb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/laplace/test_diag_hessian.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_diag_hessian():
expected = tree_map(lambda x: torch.zeros_like(x), params)
for x, y in zip(xs, ys):
with torch.no_grad():
hess = hessian_diag(lambda p: log_posterior(p, (x, y)))(params)
hess = hessian_diag(lambda p: log_posterior(p, (x, y))[0])(params)
expected = tree_map(lambda x, y: x - y, expected, hess)

for key in expected:
Expand Down

0 comments on commit 93cedb0

Please sign in to comment.