parameters: (self, name="mode")
docstring: Mode of the distribution.
  
      Note that the mode for the Beta distribution is only defined
      when `alpha > 1`. This returns the mode when `alpha > 1`,
      and NaN otherwise. If `self.allow_nan_stats` is `False`, an exception
      will be raised rather than returning `NaN`.
  
      Args:
        name: The name for this op.
  
      Returns:
        Mode of the Dirichlet distribution.
docstring_summary: Mode of the distribution.
docstring_tokens: Mode of the distribution .
function: def mode(self, name="mode"):
      """Mode of the distribution.
  
      Note that the mode for the Beta distribution is only defined
      when `alpha > 1`. This returns the mode when `alpha > 1`,
      and NaN otherwise. If `self.allow_nan_stats` is `False`, an exception
      will be raised rather than returning `NaN`.
  
      Args:
        name: The name for this op.
  
      Returns:
        Mode of the Dirichlet distribution.
      """
      with ops.name_scope(self.name):
        with ops.op_scope([self._alpha, self._alpha_0], name):
          one = constant_op.constant(1, self.dtype)
          mode = (self._alpha - 1)/ (
              array_ops.expand_dims(self._alpha_0, -1) - math_ops.cast(
                  self.event_shape()[0], self.dtype))
  
          if self.allow_nan_stats:
            return math_ops.select(
                math_ops.greater(self._alpha, 1),
                mode,
                (constant_op.constant(float("NaN"), dtype=self.dtype) *
                 array_ops.ones_like(self._alpha, dtype=self.dtype)))
          else:
            return control_flow_ops.with_dependencies([
                check_ops.assert_less(
                    one, self._alpha,
                    message="mode not defined for components of alpha <= 1")
            ], mode)
function_tokens: def mode ( self , name = "mode" ) : with ops . name_scope ( self . name ) : with ops . op_scope ( [ self . _alpha , self . _alpha_0 ] , name ) : one = constant_op . constant ( 1 , self . dtype ) mode = ( self . _alpha - 1 ) / ( array_ops . expand_dims ( self . _alpha_0 , - 1 ) - math_ops . cast ( self . event_shape ( ) [ 0 ] , self . dtype ) ) if self . allow_nan_stats : return math_ops . select ( math_ops . greater ( self . _alpha , 1 ) , mode , ( constant_op . constant ( float ( "NaN" ) , dtype = self . dtype ) * array_ops . ones_like ( self . _alpha , dtype = self . dtype ) ) ) else : return control_flow_ops . with_dependencies ( [ check_ops . assert_less ( one , self . _alpha , message = "mode not defined for components of alpha <= 1" ) ] , mode )