def mode(self, name='mode'):
    'Mode of each batch member.\n\n    The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,\n    and `NaN` otherwise.  If `self.allow_nan_stats` is `False`, an exception\n    will be raised rather than returning `NaN`.\n\n    Args:\n      name:  A name to give this op.\n\n    Returns:\n      The mode for every batch member, a `Tensor` with same `dtype` as self.\n    '
    alpha = self._alpha
    beta = self._beta
    with ops.name_scope(self.name):
        with ops.name_scope(name, values=[alpha, beta]):
            mode_if_defined = ((alpha - 1.0) / beta)
            if self.allow_nan_stats:
                alpha_ge_1 = (alpha >= 1.0)
                nan = (np.nan * self._ones())
                return math_ops.select(alpha_ge_1, mode_if_defined, nan)
            else:
                one = constant_op.constant(1.0, dtype=self.dtype)
                return control_flow_ops.with_dependencies([check_ops.assert_less(one, alpha, message='mode not defined for components of alpha <= 1')], mode_if_defined)
Mode of each batch member.

The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
and `NaN` otherwise.  If `self.allow_nan_stats` is `False`, an exception
will be raised rather than returning `NaN`.

Args:
  name:  A name to give this op.

Returns:
  The mode for every batch member, a `Tensor` with same `dtype` as self.
def mode(self, name='mode'):
    'Mode of each batch member.\n\n    The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,\n    and `NaN` otherwise.  If `self.allow_nan_stats` is `False`, an exception\n    will be raised rather than returning `NaN`.\n\n    Args:\n      name:  A name to give this op.\n\n    Returns:\n      The mode for every batch member, a `Tensor` with same `dtype` as self.\n    '
    alpha = self._alpha
    beta = self._beta
    with ops.name_scope(self.name):
        with ops.name_scope(name, values=[alpha, beta]):
            mode_if_defined = ((alpha - 1.0) / beta)
            if self.allow_nan_stats:
                alpha_ge_1 = (alpha >= 1.0)
                nan = (np.nan * self._ones())
                return math_ops.select(alpha_ge_1, mode_if_defined, nan)
            else:
                one = constant_op.constant(1.0, dtype=self.dtype)
                return control_flow_ops.with_dependencies([check_ops.assert_less(one, alpha, message='mode not defined for components of alpha <= 1')], mode_if_defined)