class_docstr: Interface class for the two De-randomized smoothing approaches supported by ART for pytorch.
  
  If a regular pytorch neural network is fed in then (De)Randomized Smoothing as introduced in Levine et al. (2020)
  is used.
  
  Otherwise, if a timm vision transfomer is fed in then Certified Patch Robustness via Smoothed Vision Transformers
  as introduced in Salman et al. (2021) is used.
docstr: Helper function to get the accuracy during training.
  
  :param preds: model predictions.
  :param labels: ground truth labels (not one hot).
  :return: prediction accuracy.
docstr_tok: ["Helper","function","to","get","the","accuracy","during","training",".",":","param","preds",":","model","predictions",".",":","param","labels",":","ground","truth","labels","(","not","one","hot",")",".",":","return",":","prediction","accuracy","."]
code: def get_accuracy(
      preds: Union[np.ndarray, "torch.Tensor"],
      labels: Union[np.ndarray, "torch.Tensor"],
  ) -> np.ndarray:
      """
      Helper function to get the accuracy during training.
  
      :param preds: model predictions.
      :param labels: ground truth labels (not one hot).
      :return: prediction accuracy.
      """
      if not isinstance(preds, np.ndarray):
          preds = preds.detach().cpu().numpy()
  
      if not isinstance(labels, np.ndarray):
          labels = labels.detach().cpu().numpy()
  
      return np.sum(np.argmax(preds, axis=1) == labels) / len(labels)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import importlib
  import logging
  from typing import List, Optional, Tuple, Union, Any, TYPE_CHECKING
  import random
  import numpy
  from tqdm import tqdm
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.certification.derandomized_smoothing.derandomized import DeRandomizedSmoothingMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 5 for calling the PyTorchDeRandomizedSmoothing obj's underlying member method code with example usage: obj.get_accuracy(preds, labels) and returns: unknown