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: Forward pass.
  
  Parameters
  ----------
  x
      Input tensor.
  
  Returns
  -------
  x_hat
      Reconstruction of the input tensor.
docstr_tok: ["Forward","pass",".","Parameters","--","--","--","--","--","x","Input","tensor",".","Returns","--","--","--","-","x_hat","Reconstruction","of","the","input","tensor","."]
code: def forward(
      self, x: torch.Tensor
  ) -> Union[torch.Tensor, List[torch.Tensor]]:
      """
      Forward pass.
  
      Parameters
      ----------
      x
          Input tensor.
  
      Returns
      -------
      x_hat
          Reconstruction of the input tensor.
      """
      z = self.encoder(x)
      x_hat = self.decoder(z)
      return x_hat
  
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 2 for calling the AE obj's underlying member method code with example usage: obj.forward(x) and returns: x_hat