Esempio n. 1
0
 def disabled_testFailureCase(self):  # pylint: disable=invalid-name
   # TODO(b/140229057): This test should pass.
   dist = tfd.Chi(df=np.float32(27.744131) * np.ones((4,)).astype(np.float32))
   dist = tfd.TransformedDistribution(
       bijector=tfb.NormalCDF(), distribution=dist)
   dist = tfb.Expm1()(dist)
   samps = 1.7182817 + tf.zeros_like(dist.sample(seed=test_util.test_seed()))
   self.assertAllClose(dist.log_prob(samps)[0], dist[0].log_prob(samps[0]))
 def disabled_testFailureCase(self):
   # TODO(b/140229057): This test should pass.
   dist = tfd.Chi(df=np.float32(27.744131))
   dist = tfd.TransformedDistribution(
       bijector=tfb.NormalCDF(), distribution=dist, batch_shape=[4])
   dist = tfb.Expm1()(dist)
   samps = 1.7182817 + tf.zeros_like(dist.sample(seed=test_util.test_seed()))
   self.assertAllClose(dist.log_prob(samps)[0], dist[0].log_prob(samps[0]))
Esempio n. 3
0
 def testComposeFromTDSubclassWithAlternateCtorArgs(self):
   # This line used to raise an exception.
   tfb.Identity()(tfd.Chi(df=1., allow_nan_stats=True))