class_docstr: Base class for all image autoencoders that we train, like VQGAN or AutoencoderKL
  (we also restore them explicitly as special cases for legacy reasons).
  Regularizations such as KL or VQ are moved to the regularizer class.
class_docstr_tok: ["Base","class","for","all","image","autoencoders","that","we","train",",","like","VQGAN","or","AutoencoderKL","(","we","also","restore","them","explicitly","as","special","cases","for","legacy","reasons",")",".","Regularizations","such","as","KL","or","VQ","are","moved","to","the","regularizer","class","."]
code: def get_input(self, batch: Dict) -> torch.Tensor:
      # assuming unified data format, dataloader returns a dict.
      # image tensors should be scaled to -1 ... 1 and in channels-first
      # format (e.g., bchw instead if bhwc)
      return batch[self.input_key]
  
imports: import logging
  import math
  import re
  from abc import abstractmethod
  from contextlib import contextmanager
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pytorch_lightning
  import torch
  import torch.nn
  from einops import rearrange
  from packaging import version
  from ..modules.autoencoding.regularizers import AbstractRegularizer
  from ..modules.ema import LitEma
  from ..util import default, get_nested_attribute, get_obj_from_str, instantiate_from_config
label_desc: Use image node_id 2 for calling the AutoencodingEngine obj's underlying member method code with example usage: obj.get_input(batch) and returns: batch