Lstsq
self
: (Tensor) the matrix A
: (Tensor) the by matrix The case when \eqn{m < n} is not supported on the GPU.
Computes the solution to the least squares and least norm problems for a full rank matrix of size and a matrix of size .
If , torch_lstsq()
solves the least-squares problem:
If , torch_lstsq()
solves the least-norm problem:
Returned tensor has shape . The first
rows of contains the solution. If , the residual sum of squares for the solution in each column is given by the sum of squares of elements in the remaining rows of that column.
Useful links