import tensorflow as tf

    del filters
    hparams = self.hparams
    final_filters = common_layers.shape_list(layer)[-1]
    filters = hparams.hidden_size
    kernel = (4, 4)

    if hparams.mode == tf.estimator.ModeKeys.PREDICT:
      layer_shape = common_layers.shape_list(layer)
      if hparams.full_latent_tower:
        rand = tf.random_uniform(layer_shape[:-1] + [hparams.bottleneck_bits])
      else:
        rand = tf.random_uniform(layer_shape[:-3] + [
            1, 1, hparams.bottleneck_bits])
      d = 2.0 * tf.to_float(tf.less(0.5, rand)) - 1.0
      z = tf.layers.dense(d, final_filters, name="unbottleneck")
      return layer + z, 0.0

    # Embed.
    x = tf.layers.dense(
        features["cur_target_frame"], filters, name="latent_embed",
        bias_initializer=tf.random_normal_initializer(stddev=0.01))
    x = common_attention.add_timing_signal_nd(x)

    if hparams.full_latent_tower:
      for i in range(hparams.num_compress_steps):
        with tf.variable_scope("latent_downstride%d" % i):
