code: def acc(y_pred, y_true, *, ignore_index=-100, reduction="mean"):
      """
      Computes the accuracy.
  
      This is a functional version of :class:`~poutyne.Accuracy`.
  
      See :class:`~poutyne.Accuracy` for details.
      """
      y_pred = y_pred.argmax(1)
      weights = (y_true != ignore_index).float()
      num_labels = weights.sum()
      acc_pred = (y_pred == y_true).float() * weights
  
      if reduction in ["mean", "sum"]:
          acc_pred = acc_pred.sum()
  
      if reduction == "mean":
          acc_pred = acc_pred / num_labels
  
      return acc_pred * 100
  
imports: from abc import ABC
  import torch.nn
  from poutyne.framework.metrics.metrics_registering import do_register_metric_func, register_metric_func
label_desc: Use image node_id 1 for calling a global function with example usage: acc(y_pred, y_true) and returns: unknown