Autograd Utility: Jacobian

Autograd Utility: Jacobian#

Utilities for calculating Jacobians via autograd.

tad_mctc.autograd.compat.jacrev_compat(f, argnums=0, **kwargs)[source]#

Wrapper for Jacobian calcluation.

Warning

The compatibility wrapper sets create_graph=True by default.

Parameters:
  • f (Callable[[Any], Tensor]) – The function whose result is differentiated.

  • argnums (int, optional) – The variable w.r.t. which will be differentiated. Defaults to 0.