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: Computes the categorical cross entropy loss with the correct class having the lower bound prediction,
  and the other classes having their upper bound predictions.
  
  :param prediction: model predictions.
  :param target: target classes. NB not one hot.
  :return: scalar loss value
docstr_tok: ["Computes","the","categorical","cross","entropy","loss","with","the","correct","class","having","the","lower","bound","prediction",",","and","the","other","classes","having","their","upper","bound","predictions",".",":","param","prediction",":","model","predictions",".",":","param","target",":","target","classes",".","NB","not","one","hot",".",":","return",":","scalar","loss","value"]
code: def interval_loss_cce(
      prediction: "torch.Tensor", target: "torch.Tensor"
  ) -> "torch.Tensor":
      """
      Computes the categorical cross entropy loss with the correct class having the lower bound prediction,
      and the other classes having their upper bound predictions.
  
      :param prediction: model predictions.
      :param target: target classes. NB not one hot.
      :return: scalar loss value
      """
      upper_preds = prediction[:, 1, :]
      criterion = torch.nn.CrossEntropyLoss()
      for i, j in enumerate(target):
          # for the prediction corresponding to the target class, take the lower bound predictions
          upper_preds[i, j] = prediction[i, 0, j]
      return criterion(upper_preds, target)
  
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 6 for calling the PyTorchIBPClassifier obj's underlying member method code with example usage: obj.interval_loss_cce(prediction, target) and returns: criterion