class_docstr: Generator model.
  
  Made of an encoder-decoder-encoder architecture.
  
  Args:
      input_size (tuple[int, int]): Size of input data.
      latent_vec_size (int): Dimension of latent vector produced between the first encoder-decoder.
      num_input_channels (int): Number of channels in input image.
      n_features (int): Number of feature maps in each convolution layer.
      extra_layers (int, optional): Extra intermediate layers in the encoder/decoder. Defaults to 0.
      add_final_conv_layer (bool, optional): Add a final convolution layer in the decoder. Defaults to True.
class_docstr_tok: ["Generator","model",".","Made","of","an","encoder-decoder-encoder","architecture",".","Args",":","input_size","(","tuple","[","int",",","int","]",")",":","Size","of","input","data",".","latent_vec_size","(","int",")",":","Dimension","of","latent","vector","produced","between","the","first","encoder-decoder",".","num_input_channels","(","int",")",":","Number","of","channels","in","input","image",".","n_features","(","int",")",":","Number","of","feature","maps","in","each","convolution","layer",".","extra_layers","(","int",",","optional",")",":","Extra","intermediate","layers","in","the","encoder\/decoder",".","Defaults","to","0.","add_final_conv_layer","(","bool",",","optional",")",":","Add","a","final","convolution","layer","in","the","decoder",".","Defaults","to","True","."]
code: def __init__(
      self,
      input_size: tuple[int, int],
      latent_vec_size: int,
      num_input_channels: int,
      n_features: int,
      extra_layers: int = 0,
      add_final_conv_layer: bool = True,
  ) -> None:
      super().__init__()
      self.encoder1 = Encoder(
          input_size,
          latent_vec_size,
          num_input_channels,
          n_features,
          extra_layers,
          add_final_conv_layer,
      )
      self.decoder = Decoder(
          input_size,
          latent_vec_size,
          num_input_channels,
          n_features,
          extra_layers,
      )
      self.encoder2 = Encoder(
          input_size,
          latent_vec_size,
          num_input_channels,
          n_features,
          extra_layers,
          add_final_conv_layer,
      )
  
imports: from __future__ import annotations
  import math
  import torch
  from torch import Tensor, nn
  from anomalib.data.utils.image import pad_nextpow2
label_desc: Use image node_id 1 to create a new Generator object from inherited base classes: nn with example: obj = Generator(input_size, latent_vec_size, num_input_channels, n_features, extra_layers, add_final_conv_layer)