Skip to content

Commit

Permalink
feat: hessian (#31)
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <[email protected]>
  • Loading branch information
nstarman authored Mar 15, 2024
1 parent d1f8223 commit 564a0f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/quaxed/_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def grad( # noqa: PLR0913
)


def hessian(
fun: Callable[..., Any],
argnums: int | Sequence[int] = 0,
*,
has_aux: bool = False,
holomorphic: bool = False,
) -> Callable[..., Any]:
"""Quaxed version of :func:`jax.hessian`."""
return quaxify(jax.hessian(fun, argnums, holomorphic=holomorphic, has_aux=has_aux))


def jacfwd(
fun: Callable[..., Any],
argnums: int | Sequence[int] = 0,
Expand Down

0 comments on commit 564a0f1

Please sign in to comment.