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
        """
        criterion = torch.nn.CrossEntropyLoss()
        ubs = torch.sum(torch.abs(prediction[1:, :]), dim=0) + prediction[0, :]
        lbs = torch.sum(-1 * torch.abs(prediction[1:, :]), dim=0) + prediction[0, :]

        # for the prediction corresponding to the target class, take the lower bound predictions
        ubs[target] = lbs[target]
        ubs = torch.unsqueeze(ubs, dim=0)
        return criterion(ubs, target)

        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
        
art/estimators/certification/deep_z/pytorch.py