class_docstr: Basic function for stochastic variational video prediction.
docstr: Create the latent tower.
code: def construct_latent_tower(self, images, time_axis):
      """Create the latent tower."""
      # No latent in the first phase
      first_phase = tf.less(
          self.get_iteration_num(),
          self.hparams.num_iterations_1st_stage,
      )
  
      # use all frames by default but this allows more
      # predicted frames at inference time
      latent_num_frames = self.hparams.latent_num_frames
      tf.logging.info(
          "Creating latent tower with %d frames." % latent_num_frames
      )
      if latent_num_frames > 0:
          images = images[:, :latent_num_frames]
  
      return common_video.conv_latent_tower(
          images=images,
          time_axis=time_axis,
          latent_channels=self.hparams.latent_channels,
          min_logvar=self.hparams.latent_std_min,
          is_training=self.is_training,
          random_latent=first_phase,
          tiny_mode=self.hparams.tiny_mode,
          small_mode=self.hparams.small_mode,
      )
  
file_path: tensor2tensor/tensor2tensor/models/video/base_vae.py
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
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the NextFrameBaseVae obj's underlying member method code with example usage: obj.construct_latent_tower(images, time_axis) and returns: common_video