class_docstr: This class is used for GPLVM models to recover a variational approximation of
  the latent variable :math:`\mathbf X`. The variational approximation will be
  an isotropic Gaussian distribution.
  
  :param int n: Size of the latent space.
  :param int data_dim: Dimensionality of the :math:`\mathbf Y` values.
  :param int latent_dim: Dimensionality of latent space.
  :param torch.Tensor X_init: initialization for the point estimate of :math:`\mathbf X`
  :param ~gpytorch.priors.Prior prior_x: prior for :math:`\mathbf X`
class_docstr_tok: ["This","class","is","used","for","GPLVM","models","to","recover","a","variational","approximation","of","the","latent","variable",":","math",":","`","\\mathbf","X","`",".","The","variational","approximation","will","be","an","isotropic","Gaussian","distribution",".",":","param","int","n",":","Size","of","the","latent","space",".",":","param","int","data_dim",":","Dimensionality","of","the",":","math",":","`","\\mathbf","Y","`","values",".",":","param","int","latent_dim",":","Dimensionality","of","latent","space",".",":","param","torch.Tensor","X_init",":","initialization","for","the","point","estimate","of",":","math",":","`","\\mathbf","X","`",":","param","~gpytorch.priors.Prior","prior_x",":","prior","for",":","math",":","`","\\mathbf","X","`"]
code: def __init__(self, n, data_dim, latent_dim, X_init, prior_x):
      super().__init__(n, latent_dim)
  
      self.data_dim = data_dim
      self.prior_x = prior_x
      # G: there might be some issues here if someone calls .cuda() on their BayesianGPLVM
      # after initializing on the CPU
  
      # Local variational params per latent point with dimensionality latent_dim
      self.q_mu = torch.nn.Parameter(X_init)
      self.q_log_sigma = torch.nn.Parameter(torch.randn(n, latent_dim))
      # This will add the KL divergence KL(q(X) || p(X)) to the loss
      self.register_added_loss_term("x_kl")
  
file_path: gpytorch/gpytorch/models/gplvm/latent_variable.py
imports: import torch
  from ...module import Module
label_desc: Use image node_id 1 to create a new VariationalLatentVariable object from inherited base classes: LatentVariable with example: obj = VariationalLatentVariable(n, data_dim, latent_dim, X_init, prior_x)