parameters: (self, values, weights=None)
return_statement: return values, weights
docstring: Accumulate statistics for computing the mean.
  
      For example, if values is [1, 3, 5, 7] then the mean is 4.
      If the weights were specified as [1, 1, 0, 0] then the mean would be 2.
  
      Args:
        values: Tensor with the per-example value.
        weights: Optional weighting of each example. Defaults to 1.
  
      Returns:
        The arguments, for easy chaining.
docstring_summary: Accumulate statistics for computing the mean.
docstring_tokens: Accumulate statistics for computing the mean .
function: def call(self, values, weights=None):
      """Accumulate statistics for computing the mean.
  
      For example, if values is [1, 3, 5, 7] then the mean is 4.
      If the weights were specified as [1, 1, 0, 0] then the mean would be 2.
  
      Args:
        values: Tensor with the per-example value.
        weights: Optional weighting of each example. Defaults to 1.
  
      Returns:
        The arguments, for easy chaining.
      """
      if weights is None:
        self.denom.assign_add(
            math_ops.cast(array_ops.identity(array_ops.size(values)), self.dtype))
        values = math_ops.reduce_sum(values)
        self.numer.assign_add(math_ops.cast(values, self.dtype))
      else:
        weights = math_ops.cast(weights, self.dtype)
        self.denom.assign_add(math_ops.reduce_sum(weights))
        values = math_ops.cast(values, self.dtype) * weights
        self.numer.assign_add(math_ops.reduce_sum(values))
      if weights is None:
        return values
      return values, weights
function_tokens: def call ( self , values , weights = None ) : if weights is None : self . denom . assign_add ( math_ops . cast ( array_ops . identity ( array_ops . size ( values ) ) , self . dtype ) ) values = math_ops . reduce_sum ( values ) self . numer . assign_add ( math_ops . cast ( values , self . dtype ) ) else : weights = math_ops . cast ( weights , self . dtype ) self . denom . assign_add ( math_ops . reduce_sum ( weights ) ) values = math_ops . cast ( values , self . dtype ) * weights self . numer . assign_add ( math_ops . reduce_sum ( values ) ) if weights is None : return values return values , weights