Skip to content

Commit

Permalink
feat: jacfwd
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <[email protected]>
  • Loading branch information
nstarman committed Mar 15, 2024
1 parent 30a90c1 commit d58275e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/quaxed/_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
__all__ = [
"device_put",
"grad",
"jacfwd",
]

from collections.abc import Callable, Hashable, Sequence
Expand Down Expand Up @@ -39,3 +40,14 @@ def grad( # noqa: PLR0913
reduce_axes=reduce_axes,
)
)


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

0 comments on commit d58275e

Please sign in to comment.