def log_prob(self, x, name='log_prob'):
    'Log prob of observations in `x` under these Gamma distribution(s).\n\n    Args:\n      x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n      name: The name to give this op.\n\n    Returns:\n      log_prob: tensor of dtype `dtype`, the log-PDFs of `x`.\n\n    Raises:\n      TypeError: if `x` and `alpha` are different dtypes.\n    '
    with ops.name_scope(self.name):
        with ops.name_scope(name, values=[self._alpha, self._beta, x]):
            alpha = self._alpha
            beta = self._beta
            x = ops.convert_to_tensor(x)
            x = control_flow_ops.with_dependencies(([check_ops.assert_positive(x)] if self.validate_args else []), x)
            contrib_tensor_util.assert_same_float_dtype(tensors=[x], dtype=self.dtype)
            return ((((alpha * math_ops.log(beta)) + ((alpha - 1) * math_ops.log(x))) - (beta * x)) - math_ops.lgamma(self._alpha))
Log prob of observations in `x` under these Gamma distribution(s).

Args:
  x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.
  name: The name to give this op.

Returns:
  log_prob: tensor of dtype `dtype`, the log-PDFs of `x`.

Raises:
  TypeError: if `x` and `alpha` are different dtypes.
def log_prob(self, x, name='log_prob'):
    'Log prob of observations in `x` under these Gamma distribution(s).\n\n    Args:\n      x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n      name: The name to give this op.\n\n    Returns:\n      log_prob: tensor of dtype `dtype`, the log-PDFs of `x`.\n\n    Raises:\n      TypeError: if `x` and `alpha` are different dtypes.\n    '
    with ops.name_scope(self.name):
        with ops.name_scope(name, values=[self._alpha, self._beta, x]):
            alpha = self._alpha
            beta = self._beta
            x = ops.convert_to_tensor(x)
            x = control_flow_ops.with_dependencies(([check_ops.assert_positive(x)] if self.validate_args else []), x)
            contrib_tensor_util.assert_same_float_dtype(tensors=[x], dtype=self.dtype)
            return ((((alpha * math_ops.log(beta)) + ((alpha - 1) * math_ops.log(x))) - (beta * x)) - math_ops.lgamma(self._alpha))