class_docstr: :math:`\mathcal{S}`-VAE model.
  
  Args:
      model_config (SVAEConfig): The Variational Autoencoder 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``.
docstr: The VAE model
  
  Args:
      inputs (BaseDataset): The training dataset with labels
  
  Returns:
      ModelOutput: An instance of ModelOutput containing all the relevant parameters
docstr_tok: ["The","VAE","model","Args",":","inputs","(","BaseDataset",")",":","The","training","dataset","with","labels","Returns",":","ModelOutput",":","An","instance","of","ModelOutput","containing","all","the","relevant","parameters"]
code: def forward(self, inputs: BaseDataset, **kwargs):
      """
      The VAE model
  
      Args:
          inputs (BaseDataset): The training dataset with labels
  
      Returns:
          ModelOutput: An instance of ModelOutput containing all the relevant parameters
  
      """
  
      x = inputs["data"]
  
      encoder_output = self.encoder(x)
  
      loc, log_concentration = (
          encoder_output.embedding,
          encoder_output.log_concentration,
      )
  
      # normalize mean
      loc = loc / loc.norm(dim=-1, keepdim=True)
  
      concentration = (
          torch.nn.functional.softplus(log_concentration) + 1
      )
      z = self._sample_von_mises(loc, concentration)
      recon_x = self.decoder(z)["reconstruction"]
  
      loss, recon_loss, kld = self.loss_function(
          recon_x, x, loc, concentration, z
      )
  
      output = ModelOutput(
          recon_loss=recon_loss,
          reg_loss=kld,
          loss=loss,
          recon_x=recon_x,
          z=z,
      )
  
      return output
  
imports: from typing import Optional
  import numpy
  import torch
  import torch.distributions
  import torch.nn.functional
  from ...data.datasets import BaseDataset
  from ..base.base_utils import ModelOutput
  from ..nn import BaseDecoder, BaseEncoder
  from ..nn.default_architectures import Encoder_SVAE_MLP
  from ..vae import VAE
  from .svae_config import SVAEConfig
  from .svae_utils import ive
label_desc: Use image node_id 2 for calling the SVAE obj's underlying member method code with example usage: obj.forward(inputs) and returns: output