(self, a, q, r)
| 103 | self.assertAllClose(x, y, atol=atol) |
| 104 | |
| 105 | def CheckApproximation(self, a, q, r): |
| 106 | if is_single: |
| 107 | tol = 1e-5 |
| 108 | else: |
| 109 | tol = 1e-14 |
| 110 | # Tests that a ~= q*r. |
| 111 | with ops.device("/cpu:0"): |
| 112 | a_recon = math_ops.matmul(q, r) |
| 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. |
no test coverage detected