class_docstr: Non-normalized GammaGaussian distribution:
  
      GammaGaussian(x, s) ~ (concentration + 0.5 * dim - 1) * log(s)
                            - rate * s - s * 0.5 * info_vec.T @ inv(precision) @ info_vec)
                            - s * 0.5 * x.T @ precision @ x + s * x.T @ info_vec,
  
  which will be reparameterized as
  
      GammaGaussian(x, s) =: alpha * log(s) + s * (-0.5 * x.T @ precision @ x + x.T @ info_vec - beta).
  
  The `s` variable plays the role of a mixing variable such that
  
      p(x | s) ~ Gaussian(s * info_vec, s * precision).
  
  Conditioned on `s`, this represents an arbitrary semidefinite quadratic function,
  which can be interpreted as a rank-deficient Gaussian distribution.
  The precision matrix may have zero eigenvalues, thus it may be impossible
  to work directly with the covariance matrix.
  
  :param torch.Tensor log_normalizer: a normalization constant, which is mainly used to keep
      track of normalization terms during contractions.
  :param torch.Tensor info_vec: information vector, which is a scaled version of the mean
      ``info_vec = precision @ mean``. We use this represention to make gaussian contraction
      fast and stable.
  :param torch.Tensor precision: precision matrix of this gaussian.
  :param torch.Tensor alpha: reparameterized shape parameter of the marginal Gamma distribution of
      `s`. The shape parameter Gamma.concentration is reparameterized by:
  
          alpha = Gamma.concentration + 0.5 * dim - 1
  
  :param torch.Tensor beta: reparameterized rate parameter of the marginal Gamma distribution of
      `s`. The rate parameter Gamma.rate is reparameterized by:
  
          beta = Gamma.rate + 0.5 * info_vec.T @ inv(precision) @ info_vec
docstr: Evaluate the log density of this GammaGaussian at a point value::
  
      alpha * log(s) + s * (-0.5 * value.T @ precision @ value + value.T @ info_vec - beta) + log_normalizer
  
  This is mainly used for testing.
docstr_tok: ["Evaluate","the","log","density","of","this","GammaGaussian","at","a","point","value",":",":","alpha","*","log","(","s",")","+","s","*","(","-0.5","*","value.T","@","precision","@","value","+","value.T","@","info_vec","-","beta",")","+","log_normalizer","This","is","mainly","used","for","testing","."]
code: def log_density(self, value, s):
      """
      Evaluate the log density of this GammaGaussian at a point value::
  
          alpha * log(s) + s * (-0.5 * value.T @ precision @ value + value.T @ info_vec - beta) + log_normalizer
  
      This is mainly used for testing.
      """
      if value.size(-1) == 0:
          batch_shape = broadcast_shape(
              value.shape[:-1], s.shape, self.batch_shape
          )
          return (
              self.alpha * s.log()
              - self.beta * s
              + self.log_normalizer.expand(batch_shape)
          )
      result = (-0.5) * self.precision.matmul(
          value.unsqueeze(-1)
      ).squeeze(-1)
      result = result + self.info_vec
      result = (value * result).sum(-1)
      return (
          self.alpha * s.log()
          + (result - self.beta) * s
          + self.log_normalizer
      )
  
imports: import math
  import torch
  from torch.distributions.utils import lazy_property
  from torch.nn.functional import pad
  from pyro.distributions.multivariate_studentt import MultivariateStudentT
  from pyro.distributions.torch import MultivariateNormal
  from pyro.distributions.util import broadcast_shape
  from pyro.ops.tensor_utils import precision_to_scale_tril
label_desc: Use image node_id 11 for calling the GammaGaussian obj's underlying member method code with example usage: obj.log_density(value, s) and returns: unknown, unknown