module
func
9 memberslucid.func`lucid.func` — functional transforms (reference-framework func-compatible API).
Functions
fn
vmap→ CallableVectorise `func` over a batch axis to produce a batched function.
fn
grad→ CallableBuild a function returning the gradient of `func`.
fn
grad_and_value→ CallableReturn a function computing both the gradient and the primal value.
fn
vjp→ tupleCompute the vector-Jacobian product of `func` at `primals`.
fn
jvp→ tupleCompute the Jacobian-vector product of `func` at `primals`.
fn
linearize→ tupleLinearise `func` around `primals` for reuse across many tangents.
fn
jacrev→ CallableBuild a function returning the reverse-mode Jacobian of `func`.
fn
jacfwd→ CallableBuild a function returning the forward-mode Jacobian of `func`.
fn
hessian→ CallableBuild a function returning the Hessian of a scalar-valued `func`.