
Last chance! 50% off unlimited learning
Sale ends in
Pinverse
torch_pinverse(self, rcond = 0)
(Tensor) The input tensor of size
(float) A floating point value to determine the cutoff for small singular values. Default: 1e-15
Calculates the pseudo-inverse (also known as the Moore-Penrose inverse) of a 2D tensor.
Please look at Moore-Penrose inverse
_ for more details
# NOT RUN {
if (torch_is_installed()) {
input = torch_randn(c(3, 5))
input
torch_pinverse(input)
# Batched pinverse example
a = torch_randn(c(2,6,3))
b = torch_pinverse(a)
torch_matmul(b, a)
}
# }
Run the code above in your browser using DataLab