class_docstr: Python test for quantization ops.
class_docstr_tok: ["Python","test","for","quantization","ops","."]
code: def test_rounding_is_unbiased(self):
      values = tf.random.uniform((20,), -100.0, 100.0, dtype=tf.float32)
      replicated = tf.broadcast_to(values, (100000, 20))
      rounded = gen_ops.stochastic_round(replicated, 1.0, ())
      self.assertEqual(rounded.dtype, tf.int32)
      averaged = tf.reduce_mean(tf.cast(rounded, tf.float32), axis=0)
      self.assertAllClose(values, averaged, atol=5e-3, rtol=0)
  
file_path: compression/tensorflow_compression/python/ops/quantization_ops_test.py
imports: import time
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_compression.python.ops import gen_ops
label_desc: Use image node_id 6 for calling the QuantizationOpsTest obj's underlying member method code with example usage: obj.test_rounding_is_unbiased() without return types