code: def evaluate_classifier_sparse(input_,
                                 labels,
                                 per_example_weights=None,
                                 topk=1,
                                 name=PROVIDED,
                                 phase=Phase.train):
    
    result = input_.evaluate_classifier_fraction_sparse(
        labels,
        per_example_weights=per_example_weights,
        topk=topk,
        name=name,
        phase=phase)
  
    return input_.with_tensor(result[0] / result[1], result.layer_parameters)
docs: Calculates the total ratio of correct predictions across all examples seen.
  
    In test and infer mode, this creates variables in the graph collection
    pt.GraphKeys.TEST_VARIABLES and does not add them to
    tf.GraphKeys.ALL_VARIABLES.  This means that you must initialize them
    separately from tf.global_variables_initializer().
  
    This breaks ties left-to-right.
  
    Args:
      input_: A rank 2 Tensor or Pretty Tensor holding the result of the model.
      labels: An integer `Tensor` with the sparse one-hot indices as
        [batch, num_true].
      per_example_weights: Weights that are applied to every example.
      topk: Integer k for 'accuracy at top k' metric.
      name: The name of this layer.
      phase: In training mode the batch accuracy is returned and in eval/infer
        modes a total average is calculated.
    Returns:
      A Pretty Tensor with the ratio of correct to total examples seen.
    Raises:
      ValueError: If labels is not the correct shape.