
Last chance! 50% off unlimited learning
Sale ends in
Cholesky_inverse
(Tensor) the input 2-D tensor
(bool, optional) whether to return a lower (default) or upper triangular matrix
(Tensor, optional) the output tensor for inv
Computes the inverse of a symmetric positive-definite matrix inv
. The inverse is computed using
LAPACK routines dpotri
and spotri
(and the corresponding MAGMA routines).
If upper
is False
,
upper
is True
or not provided,
# NOT RUN {
if (torch_is_installed()) {
# }
# NOT RUN {
a = torch_randn(c(3, 3))
a = torch_mm(a, a$t()) + 1e-05 * torch_eye(3) # make symmetric positive definite
u = torch_cholesky(a)
a
torch_cholesky_inverse(u)
a$inverse()
# }
# NOT RUN {
}
# }
Run the code above in your browser using DataLab