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

Method CheckApproximation

tensorflow/compiler/tests/qr_op_test.py:57–60  ·  view source on GitHub ↗
(self, a, q, r)

Source from the content-addressed store, hash-verified

55 self.assertTrue(np.all(self.AdjustedNorm(x - y) < 2400.0))
56
57 def CheckApproximation(self, a, q, r):
58 # Tests that a ~= q*r.
59 precision = self.AdjustedNorm(a - np.matmul(q, r))
60 self.assertTrue(np.all(precision < 3200.0))
61
62 def CheckUnitary(self, x):
63 # Tests that x[...,:,:]^H * x[...,:,:] is close to the identity.

Callers 1

_testMethod · 0.95

Calls 3

AdjustedNormMethod · 0.95
matmulMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected