Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for the determinant .
Implements Jacobi's formula by reusing differentiable primitives
(inv_op, mT_op, mul_op, broadcast_to_op) so the
backward sub-graph is itself differentiable — second-order
gradients (Hessians) work without additional code.
Both inputs and outputs are saved: is required to form in the backward and is the scalar multiplicative factor.
Math
Shape
A:(..., N, N).grad_out:(...,)(matches forward output shape).- Output gradient:
(..., N, N).
References
Petersen & Pedersen, The Matrix Cookbook (2012), §9.2.1. Magnus & Neudecker, Matrix Differential Calculus (3rd ed.), §8.4.
See Also
InvBackward : Used internally to form .
Attributes
schema_v1OpSchema"det", one input, AmpPolicy::KeepInput to prevent AMP downcasting before the inverse call.saved_inputs_[0]StorageStorage of the input matrix .
saved_output_StorageStorage of the scalar (per-batch) determinant .
Instance methods
1Compute the gradient {∂L/∂A} from the upstream scalar gradient.
Parameters
grad_outStorageUpstream gradient with shape matching
out_shape_.Returns
std::vector<Storage>Single-entry vector {∂L/∂A} aligned with the one differentiable input slot.