@@ -178,13 +178,11 @@ def testBetainc(self):
178
178
strm = test_util .test_seed_stream ()
179
179
a = tfp .distributions .HalfCauchy (
180
180
loc = np .float64 (1. ), scale = 15. ).sample (2000 , strm ())
181
- a = self .evaluate (a )
182
181
b = tfp .distributions .HalfCauchy (
183
182
loc = np .float64 (1. ), scale = 15. ).sample (2000 , strm ())
184
- b = self .evaluate (b )
185
183
x = tfp .distributions .Uniform (
186
184
high = np .float64 (1. )).sample (2000 , strm ())
187
- x = self .evaluate (x )
185
+ a , b , x = self .evaluate ([ a , b , x ] )
188
186
189
187
self .assertAllClose (
190
188
scipy_special .betainc (a , b , x ),
@@ -332,13 +330,11 @@ def testBetaincDerivativeVerySmallFloat(self):
332
330
strm = test_util .test_seed_stream ()
333
331
a = tfp .distributions .HalfNormal (
334
332
scale = np .float32 (1e-8 )).sample (100 , strm ())
335
- a = self .evaluate (a )
336
333
b = tfp .distributions .HalfNormal (
337
334
scale = np .float32 (1e-8 )).sample (100 , strm ())
338
- b = self .evaluate (b )
339
335
x = tfp .distributions .Uniform (
340
336
high = np .float32 (1. )).sample (100 , strm ())
341
- x = self .evaluate (x )
337
+ a , b , x = self .evaluate ([ a , b , x ] )
342
338
343
339
self ._testBetaincDerivative (
344
340
a , b , x , rtol_a = 0.05 , rtol_b = 0.05 , rtol_x = 1e-5 )
@@ -348,13 +344,11 @@ def testBetaincDerivativeSmallFloat(self):
348
344
strm = test_util .test_seed_stream ()
349
345
a = tfp .distributions .Uniform (
350
346
high = np .float32 (5. )).sample (100 , strm ())
351
- a = self .evaluate (a )
352
347
b = tfp .distributions .Uniform (
353
348
high = np .float32 (5. )).sample (100 , strm ())
354
- b = self .evaluate (b )
355
349
x = tfp .distributions .Uniform (
356
350
high = np .float32 (1. )).sample (100 , strm ())
357
- x = self .evaluate (x )
351
+ a , b , x = self .evaluate ([ a , b , x ] )
358
352
359
353
self ._testBetaincDerivative (
360
354
a , b , x , atol_a = 1e-3 , atol_b = 1e-3 , atol_x = 0.01 )
@@ -364,13 +358,11 @@ def testBetaincDerivativeFloat(self):
364
358
strm = test_util .test_seed_stream ()
365
359
a = tfp .distributions .Uniform (
366
360
high = np .float32 (100. )).sample (100 , strm ())
367
- a = self .evaluate (a )
368
361
b = tfp .distributions .Uniform (
369
362
high = np .float32 (100. )).sample (100 , strm ())
370
- b = self .evaluate (b )
371
363
x = tfp .distributions .Uniform (
372
364
high = np .float32 (1. )).sample (100 , strm ())
373
- x = self .evaluate (x )
365
+ a , b , x = self .evaluate ([ a , b , x ] )
374
366
375
367
self ._testBetaincDerivative (
376
368
a , b , x , atol_a = 1e-3 , atol_b = 1e-3 , atol_x = 1e-3 )
@@ -380,13 +372,11 @@ def testBetaincDerivativeVerySmallDouble(self):
380
372
strm = test_util .test_seed_stream ()
381
373
a = tfp .distributions .HalfNormal (
382
374
scale = np .float64 (1e-16 )).sample (100 , strm ())
383
- a = self .evaluate (a )
384
375
b = tfp .distributions .HalfNormal (
385
376
scale = np .float64 (1e-16 )).sample (100 , strm ())
386
- b = self .evaluate (b )
387
377
x = tfp .distributions .Uniform (
388
378
high = np .float64 (1. )).sample (100 , strm ())
389
- x = self .evaluate (x )
379
+ a , b , x = self .evaluate ([ a , b , x ] )
390
380
391
381
self ._testBetaincDerivative (
392
382
a , b , x , rtol_a = 1e-11 , rtol_b = 1e-11 , rtol_x = 1e-13 )
@@ -396,13 +386,11 @@ def testBetaincDerivativeSmallDouble(self):
396
386
strm = test_util .test_seed_stream ()
397
387
a = tfp .distributions .Uniform (
398
388
high = np .float64 (10. )).sample (100 , strm ())
399
- a = self .evaluate (a )
400
389
b = tfp .distributions .Uniform (
401
390
high = np .float64 (10. )).sample (100 , strm ())
402
- b = self .evaluate (b )
403
391
x = tfp .distributions .Uniform (
404
392
high = np .float64 (1. )).sample (100 , strm ())
405
- x = self .evaluate (x )
393
+ a , b , x = self .evaluate ([ a , b , x ] )
406
394
407
395
self ._testBetaincDerivative (
408
396
a , b , x , atol_a = 1e-12 , atol_b = 1e-12 , atol_x = 1e-11 )
@@ -412,13 +400,11 @@ def testBetaincDerivativeDouble(self):
412
400
strm = test_util .test_seed_stream ()
413
401
a = tfp .distributions .Uniform (
414
402
high = np .float64 (100. )).sample (100 , strm ())
415
- a = self .evaluate (a )
416
403
b = tfp .distributions .Uniform (
417
404
high = np .float64 (100. )).sample (100 , strm ())
418
- b = self .evaluate (b )
419
405
x = tfp .distributions .Uniform (
420
406
high = np .float64 (1. )).sample (100 , strm ())
421
- x = self .evaluate (x )
407
+ a , b , x = self .evaluate ([ a , b , x ] )
422
408
423
409
self ._testBetaincDerivative (
424
410
a , b , x , atol_a = 1e-12 , atol_b = 1e-12 , atol_x = 1e-10 )
0 commit comments