Skip to content

Commit 286251c

Browse files
Change test for challenging points
1 parent af6a386 commit 286251c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

tensorflow_probability/python/math/special_test.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,18 +426,26 @@ def testBetaincDerivativeDouble(self):
426426
@parameterized.parameters(np.float32, np.float64)
427427
@test_util.numpy_disable_gradient_test
428428
def testBetaincDerivativeChallengingPoints(self, dtype):
429-
a = np.array([0.014, 5.90, 0.536, 0.836, 0.3, 9., 1.69], dtype=dtype)
430-
b = np.array([3.467, 0.01, 2.315, 0.221, 9., 0.24, 0.117], dtype=dtype)
429+
a = np.array(
430+
[0.014, 5.90, 0.536, 0.836, 0.3, 9., 1.69, 880.],
431+
dtype=dtype)
432+
b = np.array(
433+
[3.467, 0.01, 2.315, 0.221, 9., 0.24, 0.117, 990.],
434+
dtype=dtype)
431435
x = np.array(
432-
[0.007, 0.99, 0.215, 0.782, 1e-16, 1. - 1e-6, 3.4e-4], dtype=dtype)
436+
[0.007, 0.99, 0.215, 0.782, 1e-16, 1. - 1e-6, 3.4e-4, 0.47],
437+
dtype=dtype)
433438

434439
if dtype == np.float32:
435440
self._testBetaincDerivative(
436441
a, b, x,
437-
atol_a=5e-5, atol_b=5e-4, atol_x=5e-4,
438-
rtol_a=1e-5, rtol_b=1e-5, rtol_x=1e-5)
442+
atol_a=5e-4, atol_b=5e-4, atol_x=5e-4,
443+
rtol_a=5e-4, rtol_b=5e-4, rtol_x=5e-4)
439444
else:
440-
self._testBetaincDerivative(a, b, x)
445+
self._testBetaincDerivative(
446+
a, b, x,
447+
atol_a=1e-10, atol_b=1e-10, atol_x=1e-10,
448+
rtol_a=1e-11, rtol_b=1e-11, rtol_x=1e-11)
441449

442450
@parameterized.parameters(np.float32, np.float64)
443451
@test_util.numpy_disable_gradient_test

0 commit comments

Comments
 (0)