Det
Arguments
- self
(Tensor) the input tensor of size
(*, n, n)
where*
is zero or more batch dimensions.
Note
`det` internally uses SVD results when `input` is
Backward through `det` will be
not invertible. In this case, double backward through in when `input` doesn't have distinct singular values. See
unstable `~torch.svd` for details.
Examples
if (torch_is_installed()) {
A = torch_randn(c(3, 3))
torch_det(A)
A = torch_randn(c(3, 2, 2))
A
A$det()
}
#> torch_tensor
#> -2.2955
#> 1.0171
#> -0.0339
#> [ CPUFloatType{3} ]