class_docstr: ## Autoencoder
  
  This consists of the encoder and decoder modules.
docstr: ### Encode images to latent representation
  
  :param img: is the image tensor with shape `[batch_size, img_channels, img_height, img_width]`
code: def encode(self, img: torch.Tensor) -> "GaussianDistribution":
      """
      ### Encode images to latent representation
  
      :param img: is the image tensor with shape `[batch_size, img_channels, img_height, img_width]`
      """
      # Get embeddings with shape `[batch_size, z_channels * 2, z_height, z_height]`
      z = self.encoder(img)
      # Get the moments in the quantized embedding space
      moments = self.quant_conv(z)
      # Return the distribution
      return GaussianDistribution(moments)
  
imports: from typing import List
  import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 2 for calling the Autoencoder obj's underlying member method code with example usage: obj.encode(img) and returns: GaussianDistribution