
Last chance! 50% off unlimited learning
Sale ends in
Computes the LU factorization of a matrix or batches of matrices A. Returns a tuple containing the LU factorization and pivots of A. Pivoting is done if pivot is set to True.
torch_lu(A, pivot = TRUE, get_infos = FALSE, out = NULL)
(Tensor) the tensor to factor of size (, m, n)(,m,n)
(bool, optional) <U+2013> controls whether pivoting is done. Default: TRUE
(bool, optional) <U+2013> if set to True, returns an info IntTensor. Default: FALSE
(tuple, optional) <U+2013> optional output tuple. If get_infos is True, then the elements in the tuple are Tensor, IntTensor, and IntTensor. If get_infos is False, then the elements in the tuple are Tensor, IntTensor. Default: NULL
# NOT RUN {
if (torch_is_installed()) {
A = torch_randn(c(2, 3, 3))
torch_lu(A)
}
# }
Run the code above in your browser using DataLab