class_docstr: Sampling form the inverse of the metric volume element of a :class:`~pythae.models.RHVAE`
  model.
  
  Args:
      model (RHVAE): The VAE model to sample from
      sampler_config (RHVAESamplerConfig): A RHVAESamplerConfig instance containing the main
          parameters of the sampler. If None, a pre-defined configuration is used. Default: None
class_docstr_tok: ["Sampling","form","the","inverse","of","the","metric","volume","element","of","a",":","class",":","`","~pythae.models.RHVAE","`","model",".","Args",":","model","(","RHVAE",")",":","The","VAE","model","to","sample","from","sampler_config","(","RHVAESamplerConfig",")",":","A","RHVAESamplerConfig","instance","containing","the","main","parameters","of","the","sampler",".","If","None",",","a","pre-defined","configuration","is","used",".","Default",":","None"]
code: def __init__(
      self, model: RHVAE, sampler_config: RHVAESamplerConfig = None
  ):
      if sampler_config is None:
          sampler_config = RHVAESamplerConfig()
  
      BaseSampler.__init__(
          self, model=model, sampler_config=sampler_config
      )
  
      self.model.M_tens = self.model.M_tens.to(self.device)
      self.model.centroids_tens = self.model.centroids_tens.to(
          self.device
      )
  
      self.mcmc_steps_nbr = sampler_config.mcmc_steps_nbr
      self.n_lf = torch.tensor([sampler_config.n_lf]).to(self.device)
      self.eps_lf = torch.tensor([sampler_config.eps_lf]).to(
          self.device
      )
      self.beta_zero_sqrt = (
          torch.tensor([sampler_config.beta_zero])
          .to(self.device)
          .sqrt()
      )
  
      self.log_pi = RHVAESampler.log_sqrt_det_G_inv
      self.grad_func = RHVAESampler.grad_log_prop
  
file_path: benchmark_VAE/src/pythae/samplers/manifold_sampler/rhvae_sampler.py
imports: import torch
  from ...models import RHVAE
  from ..base import BaseSampler
  from .rhvae_sampler_config import RHVAESamplerConfig
label_desc: Use image node_id 1 to create a new RHVAESampler object from inherited base classes: BaseSampler with example: obj = RHVAESampler(model, sampler_config)