Commit 04f70c1b authored by Vishwak Srinivasan's avatar Vishwak Srinivasan Committed by Francisco Massa
Browse files

Modify gels to lstsq (#1293)

parent f58d1d3b
...@@ -437,7 +437,7 @@ def _get_perspective_coeffs(startpoints, endpoints): ...@@ -437,7 +437,7 @@ def _get_perspective_coeffs(startpoints, endpoints):
A = torch.tensor(matrix, dtype=torch.float) A = torch.tensor(matrix, dtype=torch.float)
B = torch.tensor(startpoints, dtype=torch.float).view(8) B = torch.tensor(startpoints, dtype=torch.float).view(8)
res = torch.gels(B, A)[0] res = torch.lstsq(B, A)[0]
return res.squeeze_(1).tolist() return res.squeeze_(1).tolist()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment