class_docstr: Autoencoder. Standard autoencoder architecture. The model is composed from two submodules, the encoder and
  the decoder. The forward pass consist of passing the input to the encoder, obtain the input embedding and
  pass the embedding through the decoder. The abstraction can be used for multiple data modalities.
class_docstr_tok: ["Autoencoder",".","Standard","autoencoder","architecture",".","The","model","is","composed","from","two","submodules",",","the","encoder","and","the","decoder",".","The","forward","pass","consist","of","passing","the","input","to","the","encoder",",","obtain","the","input","embedding","and","pass","the","embedding","through","the","decoder",".","The","abstraction","can","be","used","for","multiple","data","modalities","."]
docstr: Constructor. Combine encoder and decoder in AE.
  
  Parameters
  ----------
  encoder
      Encoder network.
  decoder
      Decoder network.
docstr_tok: ["Constructor",".","Combine","encoder","and","decoder","in","AE",".","Parameters","--","--","--","--","--","encoder","Encoder","network",".","decoder","Decoder","network","."]
code: def __init__(self, encoder: nn.Module, decoder: nn.Module, **kwargs):
      """
      Constructor. Combine encoder and decoder in AE.
  
      Parameters
      ----------
      encoder
          Encoder network.
      decoder
          Decoder network.
      """
      super().__init__(**kwargs)
  
      # set encoder and decoder
      self.encoder = encoder
      self.decoder = decoder
  
      # send to device
      self.to(self.device)
  
file_path: alibi/alibi/models/pytorch/autoencoder.py
imports: import torch
  import torch.nn
  from alibi.models.pytorch.model import Model
  from typing import List, Union
label_desc: Use image node_id 1 to create a new AE object from inherited base classes: Model with example: obj = AE(encoder, decoder)