Skip to main content

Crate tang_ad

Crate tang_ad 

Source
Expand description

Reverse-mode automatic differentiation.

Tape-based AD for efficient gradient computation when outputs are scalar and inputs are many (the ML/physics optimization case).

Structs§

Tape
The AD tape that records the computational graph.
Var
A variable tracked on the AD tape.

Functions§

grad
Compute gradient of scalar-valued function via reverse-mode AD.
hessian
Compute Hessian of scalar-valued function via forward-over-forward (Dual<Dual>).
jacobian_fwd
Compute Jacobian via forward-mode (Dual numbers).
jvp
Jacobian-vector product via forward-mode: J v
vjp
Vector-Jacobian product via reverse-mode: v^T J