parameters: (self, labels, predictions, weights=None)
return_statement: return labels, predictions, weights
docstring: Accumulate accuracy statistics.
  
      `labels` and `predictions` should have the same shape.
      As argmax is being done here, labels and predictions type
      can be different.
  
      Args:
        labels: One-hot Tensor.
        predictions: Tensor with the logits or probabilities for each example.
        weights: Optional weighting of each example. Defaults to 1.
  
      Returns:
        The arguments, for easy chaining.
docstring_summary: Accumulate accuracy statistics.
docstring_tokens: Accumulate accuracy statistics .
function: def call(self, labels, predictions, weights=None):
      """Accumulate accuracy statistics.
  
      `labels` and `predictions` should have the same shape.
      As argmax is being done here, labels and predictions type
      can be different.
  
      Args:
        labels: One-hot Tensor.
        predictions: Tensor with the logits or probabilities for each example.
        weights: Optional weighting of each example. Defaults to 1.
  
      Returns:
        The arguments, for easy chaining.
      """
      check_ops.assert_equal(
          array_ops.shape(labels), array_ops.shape(predictions),
          message="Shapes of labels and predictions are unequal")
      labels = math_ops.argmax(labels, axis=-1)
      predictions = math_ops.argmax(predictions, axis=-1)
      matches = math_ops.equal(labels, predictions)
      matches = math_ops.cast(matches, self.dtype)
      super(CategoricalAccuracy, self).call(matches, weights=weights)
      if weights is None:
        return labels, predictions
      return labels, predictions, weights
function_tokens: def call ( self , labels , predictions , weights = None ) : check_ops . assert_equal ( array_ops . shape ( labels ) , array_ops . shape ( predictions ) , message = "Shapes of labels and predictions are unequal" ) labels = math_ops . argmax ( labels , axis = - 1 ) predictions = math_ops . argmax ( predictions , axis = - 1 ) matches = math_ops . equal ( labels , predictions ) matches = math_ops . cast ( matches , self . dtype ) super ( CategoricalAccuracy , self ) . call ( matches , weights = weights ) if weights is None : return labels , predictions return labels , predictions , weights