
Last chance! 50% off unlimited learning
Sale ends in
Triangular_solve
torch_triangular_solve(
self,
A,
upper = TRUE,
transpose = FALSE,
unitriangular = FALSE
)
(Tensor) multiple right-hand sides of size
(Tensor) the input triangular coefficient matrix of size
(bool, optional) whether to solve the upper-triangular system of equations (default) or the lower-triangular system of equations. Default: TRUE
.
(bool, optional) whether FALSE
.
(bool, optional) whether FALSE
.
Solves a system of equations with a triangular coefficient matrix
In particular, solves
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
# NOT RUN {
if (torch_is_installed()) {
A = torch_randn(c(2, 2))$triu()
A
b = torch_randn(c(2, 3))
b
torch_triangular_solve(b, A)
}
# }
Run the code above in your browser using DataLab