View source: R/gen-namespace.R
torch_triangular_solve | R Documentation |
Triangular_solve
torch_triangular_solve(
self,
A,
upper = TRUE,
transpose = FALSE,
unitriangular = FALSE
)
self |
(Tensor) multiple right-hand sides of size |
A |
(Tensor) the input triangular coefficient matrix of size |
upper |
(bool, optional) whether to solve the upper-triangular system of equations (default) or the lower-triangular system of equations. Default: |
transpose |
(bool, optional) whether |
unitriangular |
(bool, optional) whether |
Solves a system of equations with a triangular coefficient matrix A
and multiple right-hand sides b
.
In particular, solves AX = b
and assumes A
is upper-triangular
with the default keyword arguments.
torch_triangular_solve(b, A)
can take in 2D inputs b, A
or inputs that are
batches of 2D matrices. If the inputs are batches, then returns
batched outputs X
if (torch_is_installed()) {
A = torch_randn(c(2, 2))$triu()
A
b = torch_randn(c(2, 3))
b
torch_triangular_solve(b, A)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.