torch.logdet
torch.logdet(input) -> Tensor
Calculates log determinant of a square matrix or batches of square
   matrices.
It returns "-inf" if the input has a determinant of zero, and "NaN"
   if it has a negative determinant.
Note:
 Backward through "logdet()" internally uses SVD results when
 "input" is not invertible. In this case, double backward through
 "logdet()" will be unstable in when "input" doesn't have distinct
 singular values. See "torch.linalg.svd()" for details.

See also:
 "torch.linalg.slogdet()" computes the sign (resp. angle) and
 natural logarithm of the absolute value of the determinant of
 real-valued (resp. complex) square matrices.

Parameters:
      input (Tensor) -- the input tensor of size "(, n, n)"
      where "" is zero or more batch dimensions.
Example:
  >>> A = torch.randn(3, 3)
  >>> torch.det(A)
  tensor(0.2611)
  >>> torch.logdet(A)
  tensor(-1.3430)
  >>> A
