class_docstr: Implementation of DeepZ to certify neural network robustness. We use the zonotope 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://papers.nips.cc/paper/2018/file/f2f446980d8e971ef3da97af089481c3-Paper.pdf
class_docstr_tok: ["Implementation","of","DeepZ","to","certify","neural","network","robustness",".","We","use","the","zonotope","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",":","\/\/papers.nips.cc\/paper\/2018\/file\/f2f446980d8e971ef3da97af089481c3-Paper.pdf"]
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 math
  import warnings
  import sys
  import numpy
  import torch
  from art.estimators.certification.deep_z.deep_z import ZonoConv, ZonoDenseLayer, ZonoReLU, ZonoBounds
  from art.estimators.classification.pytorch import PyTorchClassifier
label_desc: Use image node_id 8 for calling the PytorchDeepZ obj's underlying member method code with example usage: obj.get_accuracy(preds, labels) and returns: unknown