docstr: mean of quantized samples still approximates the Bernoulli mean.
docstr_tok: ["mean","of","quantized","samples","still","approximates","the","Bernoulli","mean","."]
code: def testSampleN(self):
      """mean of quantized samples still approximates the Bernoulli mean."""
      temperature = 1e-2
      p = [0.2, 0.6, 0.5]
      dist = relaxed_bernoulli.RelaxedBernoulli(
          temperature, probs=p, validate_args=True
      )
      n = 10000
      samples = dist.sample(n, seed=test_util.test_seed())
      self.assertEqual(samples.dtype, tf.float32)
      sample_values = self.evaluate(samples)
      self.assertAllInRange(sample_values, 0.0, 1.0)
  
      frac_ones_like = np.sum(sample_values >= 0.5, axis=0) / n
      self.assertAllClose(p, frac_ones_like, atol=1e-2)
  
imports: import numpy
  import scipy.special
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import relaxed_bernoulli
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 12 for calling the RelaxedBernoulliTest obj's underlying member method code with example usage: obj.testSampleN() without return types