code: def testGammaGammaLogPDF(self):
      batch_size = 5
      alpha = tf.constant([2.0] * batch_size, dtype=np.float32)
      alpha0 = tf.constant([3.0] * batch_size, dtype=np.float32)
      beta0 = tf.constant([4.0] * batch_size, dtype=np.float32)
      x = np.array([6.0] * batch_size, dtype=np.float32)
  
      # Let
      #   alpha = concentration = 2.
      #   alpha0 = mixing_concentration = 3.,
      #   beta0 = mixing_rate = 4.
      #
      # See the PDF derivation in formula (1) of
      # http://www.brucehardie.com/notes/025/gamma_gamma.pdf.
      #
      #               x**(alpha - 1) * beta0**alpha0
      # prob(x=6) = ------------------------------------------------
      #             B(alpha, alpha0) * (x + beta0)**(alpha + alpha0)
      #
      #                6 * 4**3
      #           = --------------- = 0.04608
      #             B(2, 3) * 10**5
      #
      # log_prob(x=6) = -3.077376
      expected_log_pdf = [-3.077376] * batch_size
  
      gg = gamma_gamma.GammaGamma(
          concentration=alpha,
          mixing_concentration=alpha0,
          mixing_rate=beta0,
          validate_args=True,
      )
      log_pdf = gg.log_prob(x)
      self.assertEqual(log_pdf.shape, (5,))
      self.assertAllClose(self.evaluate(log_pdf), expected_log_pdf)
  
file_path: probability/tensorflow_probability/python/distributions/gamma_gamma_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gamma_gamma
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling the GammaGammaTest obj's underlying member method code with example usage: obj.testGammaGammaLogPDF() without return types