class_docstr: Implementation of Interval based certification for neural network robustness.
  We use the interval (also called box) representation of a datapoint as it travels through the network
  to then verify if it can have its class changed given a certain perturbation.
  
  | Paper link: https://ieeexplore.ieee.org/document/8418593
  
  This classifier has 3 modes which can be set via: classifier.model.set_forward_mode('mode')
  
  'mode' can be one of:
      + 'abstract': When we wish to certifiy datapoints and have abstract predictions
      + 'concrete': When normal predictions need to be made
      + 'attack': When we are interfacing with an ART attack (for example PGD).
docstr: Helper function to print out the accuracy during training
  
  :param preds: (concrete) model predictions
  :param labels: ground truth labels (not one hot)
  :return: prediction accuracy
docstr_tok: ["Helper","function","to","print","out","the","accuracy","during","training",":","param","preds",":","(","concrete",")","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 print out the accuracy during training
  
      :param preds: (concrete) model predictions
      :param labels: ground truth labels (not one hot)
      :return: prediction accuracy
      """
      if isinstance(preds, torch.Tensor):
          preds = preds.detach().cpu().numpy()
  
      if isinstance(labels, torch.Tensor):
          labels = labels.detach().cpu().numpy()
  
      return np.sum(np.argmax(preds, axis=1) == labels) / len(labels)
  
imports: from typing import List, Optional, Tuple, Union, Callable, Any, TYPE_CHECKING
  import logging
  import warnings
  import numpy
  import torch
  from art.estimators.certification.interval.interval import PyTorchIntervalConv2D, PyTorchIntervalDense, PyTorchIntervalReLU, PyTorchIntervalBounds
  from art.estimators.classification.pytorch import PyTorchClassifier
label_desc: Use image node_id 4 for calling the PyTorchIBPClassifier obj's underlying member method code with example usage: obj.get_accuracy(preds, labels) and returns: unknown