code: def compress_encoder_2d(x, hparams, name=None):
    
    return compress_encoder(
        x,
        hparams,
        strides=(2, 2),
        kernel_size=(hparams.kernel_size, hparams.kernel_size),
        name=name)
docs: Encoder that compresses 2-D inputs by 2**num_compress_steps.
  
    Args:
      x: Tensor of shape [batch, height, width, channels].
      hparams: HParams.
      name: string, variable scope.
  
    Returns:
      Tensor of shape [batch, latent_length, hparams.hidden_size], where
        latent_length is
        hparams.num_latents * (height*width) / 2**(hparams.num_compress_steps).