code: def accuracy(y_pred: Tensor, y_true: Tensor, **kwargs):
      y_pred = y_pred.cpu()
      outputs = np.argmax(y_pred, axis=1)
      return np.mean(outputs.numpy() == y_true.detach().cpu().numpy())
  
file_path: fast-bert/fast_bert/metrics.py
imports: import numpy
  from torch import Tensor
  from sklearn.metrics import roc_curve, auc, hamming_loss, accuracy_score, confusion_matrix
  import pdb
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(y_pred, y_true) and returns: np