class_docstr: ExpGamma distribution.
  
  The ExpGamma distribution is defined over the real line using
  parameters `concentration` (aka "alpha") and `rate` (aka "beta").
  
  This distribution is a transformation of the Gamma distribution such that
  X ~ ExpGamma(..) => exp(X) ~ Gamma(..).
  
  #### Mathematical Details
  
  The probability density function (pdf) can be derived from the change of
  variables rule (since the distribution is logically equivalent to
  `tfb.Log()(tfd.Gamma(..))`):
  
  ```none
  pdf(x; alpha, beta > 0) = exp(x)**(alpha) exp(-exp(x) beta) / Z
  Z = Gamma(alpha) beta**(-alpha)
  ```
  
  where:
  
  * `concentration = alpha`, `alpha > 0`,
  * `rate = beta`, `beta > 0`,
  * `Z` is the normalizing constant of the corresponding Gamma distribution, and
  * `Gamma` is the [gamma function](
    https://en.wikipedia.org/wiki/Gamma_function).
  
  The cumulative density function (cdf) is,
  
  ```none
  cdf(x; alpha, beta, x) = GammaInc(alpha, beta exp(x)) / Gamma(alpha)
  ```
  
  where `GammaInc` is the [lower incomplete Gamma function](
  https://en.wikipedia.org/wiki/Incomplete_gamma_function).
  
  Distribution parameters are automatically broadcast in all functions; see
  examples for details.
  
  Samples of this distribution are reparameterized (pathwise differentiable).
  The derivatives are computed using the approach described in
  [(Figurnov et al., 2018)][1].
  
  #### Examples
  
  ```python
  tfd = tfp.distributions
  
  dist = tfd.ExpGamma(concentration=3.0, rate=2.0)
  dist2 = tfd.ExpGamma(concentration=[3.0, 4.0], rate=[2.0, 3.0])
  ```
  
  Compute the gradients of samples w.r.t. the parameters:
  
  ```python
  concentration = tf.constant(3.0)
  rate = tf.constant(2.0)
  dist = tfd.ExpGamma(concentration, rate)
  with tf.GradientTape() as t:
    t.watch([concentration, rate])
    samples = dist.sample(5)  # Shape [5]
    loss = tf.reduce_mean(tf.square(samples))  # Arbitrary loss function
  # Unbiased stochastic gradients of the loss function
  grads = t.gradient(loss, [concentration, rate])
  ```
  
  #### References
  
  [1]: Michael Figurnov, Shakir Mohamed, Andriy Mnih.
       Implicit Reparameterization Gradients. _arXiv preprint arXiv:1805.08498_,
       2018. https://arxiv.org/abs/1805.08498
class_docstr_tok: ["ExpGamma","distribution",".","The","ExpGamma","distribution","is","defined","over","the","real","line","using","parameters","`","concentration","`","(","aka","``","alpha","''",")","and","`","rate","`","(","aka","``","beta","''",")",".","This","distribution","is","a","transformation","of","the","Gamma","distribution","such","that","X","~","ExpGamma","(","..",")","=",">","exp","(","X",")","~","Gamma","(","..",")",".","#","#","#","#","Mathematical","Details","The","probability","density","function","(","pdf",")","can","be","derived","from","the","change","of","variables","rule","(","since","the","distribution","is","logically","equivalent","to","`","tfb.Log","(",")","(","tfd.Gamma","(","..",")",")","`",")",":","``","`","none","pdf","(","x",";","alpha",",","beta",">","0",")","=","exp","(","x",")","*","*","(","alpha",")","exp","(","-exp","(","x",")","beta",")","\/","Z","Z","=","Gamma","(","alpha",")","beta","*","*","(","-alpha",")","``","`","where",":","*","`","concentration","=","alpha","`",",","`","alpha",">","0","`",",","*","`","rate","=","beta","`",",","`","beta",">","0","`",",","*","`","Z","`","is","the","normalizing","constant","of","the","corresponding","Gamma","distribution",",","and","*","`","Gamma","`","is","the","[","gamma","function","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Gamma_function",")",".","The","cumulative","density","function","(","cdf",")","is",",","``","`","none","cdf","(","x",";","alpha",",","beta",",","x",")","=","GammaInc","(","alpha",",","beta","exp","(","x",")",")","\/","Gamma","(","alpha",")","``","`","where","`","GammaInc","`","is","the","[","lower","incomplete","Gamma","function","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Incomplete_gamma_function",")",".","Distribution","parameters","are","automatically","broadcast","in","all","functions",";","see","examples","for","details",".","Samples","of","this","distribution","are","reparameterized","(","pathwise","differentiable",")",".","The","derivatives","are","computed","using","the","approach","described","in","[","(","Figurnov","et","al.",",","2018",")","]","[","1","]",".","#","#","#","#","Examples","``","`","python","tfd","=","tfp.distributions","dist","=","tfd.ExpGamma","(","concentration=3.0",",","rate=2.0",")","dist2","=","tfd.ExpGamma","(","concentration=","[","3.0",",","4.0","]",",","rate=","[","2.0",",","3.0","]",")","``","`","Compute","the","gradients","of","samples","w.r.t",".","the","parameters",":","``","`","python","concentration","=","tf.constant","(","3.0",")","rate","=","tf.constant","(","2.0",")","dist","=","tfd.ExpGamma","(","concentration",",","rate",")","with","tf.GradientTape","(",")","as","t",":","t.watch","(","[","concentration",",","rate","]",")","samples","=","dist.sample","(","5",")","#","Shape","[","5","]","loss","=","tf.reduce_mean","(","tf.square","(","samples",")",")","#","Arbitrary","loss","function","#","Unbiased","stochastic","gradients","of","the","loss","function","grads","=","t.gradient","(","loss",",","[","concentration",",","rate","]",")","``","`","#","#","#","#","References","[","1","]",":","Michael","Figurnov",",","Shakir","Mohamed",",","Andriy","Mnih",".","Implicit","Reparameterization","Gradients",".","_arXiv","preprint","arXiv:1805.08498_",",","2018.","https",":","\/\/arxiv.org\/abs\/1805.08498"]
code: def _parameter_control_dependencies(self, is_init):
      if not self.validate_args:
          return []
      assertions = []
      if is_init != tensor_util.is_ref(self.concentration):
          assertions.append(
              assert_util.assert_positive(
                  self.concentration,
                  message="Argument `concentration` must be positive.",
              )
          )
      if self.rate is not None and is_init != tensor_util.is_ref(
          self.rate
      ):
          assertions.append(
              assert_util.assert_positive(
                  self.rate, message="Argument `rate` must be positive."
              )
          )
      return assertions
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 16 for calling the ExpGamma obj's underlying member method code with example usage: obj._parameter_control_dependencies(is_init) and returns: assertions, list