class_docstr: Variational Autoencoder based on the paper - https://arxiv.org/abs/1312.6114
  
  Args:
      spatial_dims: number of spatial dimensions.
      in_shape: shape of input data starting with channel dimension.
      out_channels: number of output channels.
      latent_size: size of the latent variable.
      channels: sequence of channels. Top block first. The length of `channels` should be no less than 2.
      strides: sequence of convolution strides. The length of `stride` should equal to `len(channels) - 1`.
      kernel_size: convolution kernel size, the value(s) should be odd. If sequence,
          its length should equal to dimensions. Defaults to 3.
      up_kernel_size: upsampling convolution kernel size, the value(s) should be odd. If sequence,
          its length should equal to dimensions. Defaults to 3.
      num_res_units: number of residual units. Defaults to 0.
      inter_channels: sequence of channels defining the blocks in the intermediate layer between encode and decode.
      inter_dilations: defines the dilation value for each block of the intermediate layer. Defaults to 1.
      num_inter_units: number of residual units for each block of the intermediate layer. Defaults to 0.
      act: activation type and arguments. Defaults to PReLU.
      norm: feature normalization type and arguments. Defaults to instance norm.
      dropout: dropout ratio. Defaults to no dropout.
      bias: whether to have a bias term in convolution blocks. Defaults to True.
          According to `Performance Tuning Guide <https://pytorch.org/tutorials/recipes/recipes/tuning_guide.html>`_,
          if a conv layer is directly followed by a batch norm layer, bias should be False.
      use_sigmoid: whether to use the sigmoid function on final output. Defaults to True.
  
  Examples::
  
      from monai.networks.nets import VarAutoEncoder
  
      # 3 layer network accepting images with dimensions (1, 32, 32) and using a latent vector with 2 values
      model = VarAutoEncoder(
          spatial_dims=2,
          in_shape=(32, 32),  # image spatial shape
          out_channels=1,
          latent_size=2,
          channels=(16, 32, 64),
          strides=(1, 2, 2),
      )
  
  see also:
      - Variational autoencoder network with MedNIST Dataset
        https://github.com/Project-MONAI/tutorials/blob/master/modules/varautoencoder_mednist.ipynb
code: def reparameterize(
      self, mu: torch.Tensor, logvar: torch.Tensor
  ) -> torch.Tensor:
      std = torch.exp(0.5 * logvar)
  
      if (
          self.training
      ):  # multiply random noise with std only during training
          std = torch.randn_like(std).mul(std)
  
      return std.add_(mu)
  
file_path: MONAI/monai/networks/nets/varautoencoder.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import numpy
  import torch
  import torch.nn
  from torch.nn import functional
  from monai.networks.layers.convutils import calculate_out_shape, same_padding
  from monai.networks.layers.factories import Act, Norm
  from monai.networks.nets import AutoEncoder
label_desc: Use image node_id 4 for calling the VarAutoEncoder obj's underlying member method code with example usage: obj.reparameterize(mu, logvar) and returns: std