linalg_inv_ex | R Documentation |
Returns a namedtuple (inverse, info)
. inverse
contains the result of
inverting A
and info
stores the LAPACK error codes.
If A
is not an invertible matrix, or if it's a batch of matrices
and one or more of them is not an invertible matrix,
then info
stores a positive integer for the corresponding matrix.
The positive integer indicates the diagonal element of the LU decomposition of
the input matrix that is exactly zero.
info
filled with zeros indicates that the inversion was successful.
If check_errors=TRUE
and info
contains positive integers, then a RuntimeError is thrown.
Supports input of float, double, cfloat and cdouble dtypes.
Also supports batches of matrices, and if A
is a batch of matrices then
the output has the same batch dimensions.
linalg_inv_ex(A, check_errors = FALSE)
A |
(Tensor): tensor of shape |
check_errors |
(bool, optional): controls whether to check the content of |
If A
is on a CUDA device then this function may synchronize
that device with the CPU.
This function is "experimental" and it may change in a future PyTorch release.
linalg_inv()
is a NumPy compatible variant that always checks for errors.
Other linalg:
linalg_cholesky_ex()
,
linalg_cholesky()
,
linalg_det()
,
linalg_eigh()
,
linalg_eigvalsh()
,
linalg_eigvals()
,
linalg_eig()
,
linalg_householder_product()
,
linalg_inv()
,
linalg_lstsq()
,
linalg_matrix_norm()
,
linalg_matrix_power()
,
linalg_matrix_rank()
,
linalg_multi_dot()
,
linalg_norm()
,
linalg_pinv()
,
linalg_qr()
,
linalg_slogdet()
,
linalg_solve_triangular()
,
linalg_solve()
,
linalg_svdvals()
,
linalg_svd()
,
linalg_tensorinv()
,
linalg_tensorsolve()
,
linalg_vector_norm()
if (torch_is_installed()) {
A <- torch_randn(3, 3)
out <- linalg_inv_ex(A)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.