pugh_torch.linalg package

Submodules

pugh_torch.linalg.batch_lstsq module

Based on:

https://github.com/pytorch/pytorch/issues/27749#issuecomment-703387840

pugh_torch.linalg.batch_lstsq.batch_lstsq(B, A)[source]

Compute the least-squares solution.

Finds x that minimizes Ax - B

Parameters
  • input (torch.Tensor) – (b, m, k)

  • A (torch.Tensor) – (b, m, n)

Returns

(b, n, k) least squares solution.

Return type

torch.Tensor

Module contents