mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
This commit is contained in:
parent
eebcc861ac
commit
cdc08afbb2
|
|
@ -87,7 +87,11 @@ class MatrixSolveLsOpTest(test.TestCase):
|
|||
self.assertAllClose(np_r_norm, tf_r_norm)
|
||||
|
||||
# Check solution.
|
||||
self.assertAllClose(np_ans, ans, atol=1e-5, rtol=1e-5)
|
||||
if np_type == np.float32 or np_type == np.complex64:
|
||||
tol = 5e-5
|
||||
else:
|
||||
tol = 1e-12
|
||||
self.assertAllClose(np_ans, ans, atol=tol, rtol=tol)
|
||||
|
||||
def _verifySolveBatch(self, x, y):
|
||||
# Since numpy.linalg.lsqr does not support batch solves, as opposed
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user