Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

torch_cholesky_inverse

Cholesky_inverse


Description

Cholesky_inverse

Usage

torch_cholesky_inverse(self, upper = FALSE)

Arguments

self

(Tensor) the input 2-D tensor u, a upper or lower triangular Cholesky factor

upper

(bool, optional) whether to return a lower (default) or upper triangular matrix

cholesky_inverse(input, upper=False, out=NULL) -> Tensor

Computes the inverse of a symmetric positive-definite matrix A using its Cholesky factor u: returns matrix inv. The inverse is computed using LAPACK routines dpotri and spotri (and the corresponding MAGMA routines).

If upper is FALSE, u is lower triangular such that the returned tensor is

inv = (uu^{{T}})^{{-1}}

If upper is TRUE or not provided, u is upper triangular such that the returned tensor is

inv = (u^T u)^{{-1}}

Examples

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()

## End(Not run)
}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.