code: def sum_up_accuracy_(self, logits, cls):
      if self.multi_label:
          proba = torch.sigmoid(logits)
          thresholded = F.threshold(proba, 0.5, 0)
          thresholded[thresholded > 0] = 1
          num_labels = logits.shape[1]
          acc = (thresholded == cls).sum(axis=1) / num_labels
          acc = acc.sum().item()
      else:
          acc = (logits.argmax(1) == cls).sum().item()
  
      return acc
  
imports: import logging
  import warnings
  from abc import abstractmethod
  from functools import partial
  from pathlib import Path
  from small_text.classifiers.classification import Classifier
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.training.early_stopping import EarlyStopping, NoopEarlyStopping, EarlyStoppingOrCondition
  from small_text.training.metrics import Metric
  from small_text.training.model_selection import ModelSelection, NoopModelSelection
  from small_text.utils.classification import empty_result, prediction_result
label_desc: Use image node_id 13 for calling the PytorchClassifier obj's underlying member method code with example usage: obj.sum_up_accuracy_(logits, cls) and returns: acc