code: def accuracy_thresh(
      y_pred: Tensor,
      y_true: Tensor,
      thresh: float = CLASSIFICATION_THRESHOLD,
      sigmoid: bool = True,
      **kwargs,
  ):
      "Compute accuracy when `y_pred` and `y_true` are the same size."
      if sigmoid:
          y_pred = y_pred.sigmoid()
      return ((y_pred > thresh) == y_true.bool()).float().mean().item()
  
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 3 for calling a global function with example usage: accuracy_thresh(y_pred, y_true, thresh, sigmoid) and returns: unknown