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

Method AdjustedNorm

tensorflow/compiler/tests/qr_op_test.py:35–38  ·  view source on GitHub ↗

Computes the norm of matrices in 'x', adjusted for dimension and type.

(self, x)

Source from the content-addressed store, hash-verified

33class QrOpTest(xla_test.XLATestCase, parameterized.TestCase):
34
35 def AdjustedNorm(self, x):
36 """Computes the norm of matrices in 'x', adjusted for dimension and type."""
37 norm = np.linalg.norm(x, axis=(-2, -1))
38 return norm / (max(x.shape[-2:]) * np.finfo(x.dtype).eps)
39
40 def CompareOrthogonal(self, x, y, rank):
41 # We only compare the first 'rank' orthogonal vectors since the

Callers 3

CompareOrthogonalMethod · 0.95
CheckApproximationMethod · 0.95
CheckUnitaryMethod · 0.95

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected