Python wrappers
Public Python APIs implemented by this engine symbol.Compute for a square float tensor.
Validates that a is at least 2-D, square in the trailing two
dimensions, and float-typed; dispatches to the backend; and wires
DetBackward into the autograd graph (saving both and the
scalar output) when grad mode is active.
Shape
a:(..., N, N).- Output:
(...,)(rank decreases by 2; a single 2-D input yields a 0-D scalar).
See Also
inv_op : Matrix inverse, used in the backward.
Parameters
aTensorImplPtrInput matrix of shape
(..., N, N).Returns
TensorImplPtrScalar-per-batch determinant of shape (...,) (the trailing two matrix dimensions are removed).
Raises
ValueErrorIf
a is fewer than 2 dimensions, non-square, or non-float.LinAlgError(At backend level.) If is singular — LU returns a zero pivot.
Notes
For ill-conditioned prefer slogdet (sign + log) when it
becomes available; the magnitude of det can over/underflow long
before is numerically singular.