class_docstr: Partially Importance Weighted Autoencoder model.
  
  Args:
      model_config (PIWAEConfig): The PIWAE configuration setting the main
          parameters of the model.
  
      encoder (BaseEncoder): An instance of BaseEncoder (inheriting from `torch.nn.Module` which
          plays the role of encoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
      decoder (BaseDecoder): An instance of BaseDecoder (inheriting from `torch.nn.Module` which
          plays the role of decoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
  .. note::
      For high dimensional data we advice you to provide you own network architectures. With the
      provided MLP you may end up with a ``MemoryError``.
code: def __init__(
      self,
      model_config: PIWAEConfig,
      encoder: Optional[BaseEncoder] = None,
      decoder: Optional[BaseDecoder] = None,
  ):
      VAE.__init__(
          self,
          model_config=model_config,
          encoder=encoder,
          decoder=decoder,
      )
  
      self.model_name = "PIWAE"
      self.gradient_n_estimates = model_config.number_gradient_estimates
      self.n_samples = model_config.number_samples
  
file_path: benchmark_VAE/src/pythae/models/piwae/piwae_model.py
imports: from typing import Optional
  import torch
  import torch.nn.functional
  from ...data.datasets import BaseDataset
  from ..base.base_utils import ModelOutput
  from ..nn import BaseDecoder, BaseEncoder
  from ..vae import VAE
  from .piwae_config import PIWAEConfig
label_desc: Use image node_id 1 to create a new PIWAE object from inherited base classes: VAE with example: obj = PIWAE(model_config, encoder, decoder)