(self)
| 1414 | # self.assertLess(np.linalg.norm(np.dot(a, v) - w * v), 1e-3) |
| 1415 | |
| 1416 | def testSVD(self): |
| 1417 | a = np.array( |
| 1418 | [[4, 6, 8, 10], [6, 45, 54, 63], [8, 54, 146, 166], [10, 63, 166, 310]], |
| 1419 | dtype=np.float32) |
| 1420 | c = self._NewComputation() |
| 1421 | c.SVD(c.Constant(a)) |
| 1422 | u, d, v = self._Execute(c, ()) |
| 1423 | self.assertLess(np.linalg.norm(a - np.matmul(u * d, v.T)), 1e-3) |
| 1424 | |
| 1425 | def testTriangularSolve(self): |
| 1426 | a_vals = np.array( |
nothing calls this directly
no test coverage detected