torch_det {torch} | R Documentation |
Det
Description
Det
Usage
torch_det(self)
Arguments
self |
(Tensor) the input tensor of size |
det(input) -> Tensor
Calculates determinant of a square matrix or batches of square matrices.
Note
Backward through `det` internally uses SVD results when `input` is not invertible. In this case, double backward through `det` will be unstable in when `input` doesn't have distinct singular values. See `~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()
}
[Package torch version 0.13.0 Index]