(self, x)
| 113 | self.assertAllClose(a_recon, a, rtol=tol, atol=tol) |
| 114 | |
| 115 | def CheckUnitary(self, x): |
| 116 | # Tests that x[...,:,:]^H * x[...,:,:] is close to the identity. |
| 117 | with ops.device("/cpu:0"): |
| 118 | xx = math_ops.matmul(x, x, adjoint_a=True) |
| 119 | identity = array_ops.matrix_band_part(array_ops.ones_like(xx), 0, 0) |
| 120 | if is_single: |
| 121 | tol = 1e-5 |
| 122 | else: |
| 123 | tol = 1e-14 |
| 124 | self.assertAllClose(identity, xx, atol=tol) |
| 125 | |
| 126 | @test_util.run_v1_only("b/120545219") |
| 127 | def Test(self): |
no test coverage detected