MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testEigh

Method testEigh

tensorflow/compiler/xla/python/xla_client_test.py:1404–1414  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1402 np.testing.assert_allclose(np.dot(q, r), a, rtol=1e-4)
1403
1404 def testEigh(self):
1405 a = np.array(
1406 [[4, 6, 8, 10], [6, 45, 54, 63], [8, 54, 146, 166], [10, 63, 166, 310]],
1407 dtype=np.float32)
1408 a = (a + a.T) / 2
1409
1410 c = self._NewComputation()
1411 c.Eigh(c.Constant(a), full_matrices=True)
1412 # TODO(b/129396575): Turn this test back on when it passes without fastmath.
1413 # v, w = self._Execute(c, ())
1414 # self.assertLess(np.linalg.norm(np.dot(a, v) - w * v), 1e-3)
1415
1416 def testSVD(self):
1417 a = np.array(

Callers

nothing calls this directly

Calls 3

_NewComputationMethod · 0.80
EighMethod · 0.80
ConstantMethod · 0.45

Tested by

no test coverage detected