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

torch_lu_solve

Lu_solve


Description

Lu_solve

Usage

torch_lu_solve(self, LU_data, LU_pivots)

Arguments

self

(Tensor) the RHS tensor of size (*, m, k), where * is zero or more batch dimensions.

LU_data

(Tensor) the pivoted LU factorization of A from torch_lu of size (*, m, m), where * is zero or more batch dimensions.

LU_pivots

(IntTensor) the pivots of the LU factorization from torch_lu of size (*, m), where * is zero or more batch dimensions. The batch dimensions of LU_pivots must be equal to the batch dimensions of LU_data.

lu_solve(input, LU_data, LU_pivots, out=NULL) -> Tensor

Returns the LU solve of the linear system Ax = b using the partially pivoted LU factorization of A from torch_lu.

Examples

if (torch_is_installed()) {
A = torch_randn(c(2, 3, 3))
b = torch_randn(c(2, 3, 1))
out = torch_lu(A)
x = torch_lu_solve(b, out[[1]], out[[2]])
torch_norm(torch_bmm(A, x) - b)
}

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.