class_docstr: SV2P with discrete latent.
class_docstr_tok: ["SV2P","with","discrete","latent","."]
code: def simple_discrete_latent_tower(self, input_image, target_image):
      hparams = self.hparams
  
      if self.is_predicting:
          batch_size = common_layers.shape_list(input_image)[0]
          rand = tf.random_uniform(
              [batch_size, hparams.bottleneck_bits]
          )
          bits = 2.0 * tf.to_float(tf.less(0.5, rand)) - 1.0
          return bits
  
      conv_size = self.tinyify([64, 32, 32, 1])
      pair = tf.concat([input_image, target_image], axis=-1)
      posterior_enc = self.basic_conv_net(
          pair, conv_size, "posterior_enc"
      )
      posterior_enc = tfl.flatten(posterior_enc)
      bits, _ = discretization.tanh_discrete_bottleneck(
          posterior_enc,
          hparams.bottleneck_bits,
          hparams.bottleneck_noise,
          hparams.discretize_warmup_steps,
          hparams.mode,
      )
      return bits
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.layers import discretization
  from tensor2tensor.models.video import base
  from tensor2tensor.models.video import base_vae
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the NextFrameSv2pDiscrete obj's underlying member method code with example usage: obj.simple_discrete_latent_tower(input_image, target_image) and returns: bits, bits