Returns a tuple containing the LU factorization and pivots. Pivoting is done if pivot is set.

tch_btrifact(x, pivot = TRUE)

Arguments

x

tensor object

pivot

controls whether pivoting is done

Examples

x <- tensor(array(runif(18), dim = c(2, 3, 3))) tch_btrifact(x)
#> [[1]] #> tensor #> (1,.,.) = #> 0.8431 0.5594 0.6525 #> 0.6101 -0.2078 0.0107 #> 0.9039 0.7505 0.0829 #> #> (2,.,.) = #> 0.9457 0.8097 0.3609 #> 0.0829 0.9156 0.8294 #> 0.0686 0.7407 -0.4955 #> [ Variable[CPUFloatType]{2,3,3} ] #> #> [[2]] #> tensor #> 2 2 3 #> 1 3 3 #> [ Variable[CPUIntType]{2,3} ] #>