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

Function CheckUnitary

tensorflow/python/kernel_tests/svd_op_test.py:132–136  ·  view source on GitHub ↗
(self, x, tol)

Source from the content-addressed store, hash-verified

130 self.assertAllClose(a_recon, a, rtol=tol, atol=tol)
131
132 def CheckUnitary(self, x, tol):
133 # Tests that x[...,:,:]^H * x[...,:,:] is close to the identity.
134 xx = math_ops.matmul(x, x, adjoint_a=True)
135 identity = array_ops.matrix_band_part(array_ops.ones_like(xx), 0, 0)
136 self.assertAllClose(identity, xx, atol=tol)
137
138 @test_util.run_v1_only("b/120545219")
139 def Test(self):

Callers 1

TestFunction · 0.70

Calls 2

matmulMethod · 0.45
assertAllCloseMethod · 0.45

Tested by

no test coverage detected