class_docstr: Discrete bottleneck class.
class_docstr_tok: ["Discrete","bottleneck","class","."]
docstr: Turn x_int representing numbers into a bitwise (lower-endian) tensor.
  
  Args:
      x_int: Tensor containing integer to be converted into base
      notation.
      num_bits: Number of bits in the representation.
      base: Base of the representation.
  
  Returns:
      Corresponding number expressed in base.
docstr_tok: ["Turn","x_int","representing","numbers","into","a","bitwise","(","lower-endian",")","tensor",".","Args",":","x_int",":","Tensor","containing","integer","to","be","converted","into","base","notation",".","num_bits",":","Number","of","bits","in","the","representation",".","base",":","Base","of","the","representation",".","Returns",":","Corresponding","number","expressed","in","base","."]
code: def int_to_bit(self, x_int, num_bits, base=2):
      """Turn x_int representing numbers into a bitwise (lower-endian) tensor.
  
      Args:
          x_int: Tensor containing integer to be converted into base
          notation.
          num_bits: Number of bits in the representation.
          base: Base of the representation.
  
      Returns:
          Corresponding number expressed in base.
      """
      x_l = tf.to_int32(tf.expand_dims(x_int, axis=-1))
      # pylint: disable=g-complex-comprehension
      x_labels = [
          tf.floormod(
              tf.floordiv(tf.to_int32(x_l), tf.to_int32(base) ** i),
              tf.to_int32(base),
          )
          for i in range(num_bits)
      ]
      res = tf.concat(x_labels, axis=-1)
      return tf.to_float(res)
  
file_path: tensor2tensor/tensor2tensor/layers/vq_discrete.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from functools import partial
  from tensor2tensor.layers import common_layers
  import tensorflow.compat.v1
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 6 for calling the DiscreteBottleneck obj's underlying member method code with example usage: obj.int_to_bit(x_int, num_bits, base) and returns: tf