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 grad_log_sqrt_det_G_inv(z, model):
      return (
          -0.5
          * torch.transpose(model.G(z), 1, 2)
          @ torch.transpose(
              (
                  -2
                  / (model.temperature**2)
                  * (
                      model.centroids_tens.unsqueeze(0) - z.unsqueeze(1)
                  ).unsqueeze(2)
                  @ (
                      model.M_tens.unsqueeze(0)
                      * torch.exp(
                          -torch.norm(
                              model.centroids_tens.unsqueeze(0)
                              - z.unsqueeze(1),
                              dim=-1,
                          )
                          ** 2
                          / (model.temperature**2)
                      )
                      .unsqueeze(-1)
                      .unsqueeze(-1)
                  )
              ).sum(dim=1),
              1,
              2,
          )
      )
  
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 6 for calling the RHVAESampler obj's underlying member method code with example usage: obj.grad_log_sqrt_det_G_inv(z, model) and returns: unknown