Skip to content

Commit

Permalink
fix: optimistix deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
wcxve committed Oct 9, 2024
1 parent 3450003 commit 043638d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/elisa/infer/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def lm(init):
max_steps=max_steps,
throw=throw,
)
return res.value, jnp.linalg.norm(res.state.f_info.grad)
grad_norm = jnp.linalg.norm(res.state.f_info.compute_grad())
return res.value, grad_norm

self._lm = jax.jit(lm)

Expand Down

0 comments on commit 043638d

Please sign in to comment.