def compute_loss(
        self, x: np.ndarray, y: np.ndarray, reduction: str = "none", training_mode: bool = False, **kwargs
    ) -> np.ndarray:
        """
        Compute the loss of the neural network for samples `x`.

        :param x: Samples of shape (nb_samples, nb_features) or (nb_samples, nb_pixels_1, nb_pixels_2,
                  nb_channels) or (nb_samples, nb_channels, nb_pixels_1, nb_pixels_2).
        :param y: Target values (class labels) one-hot-encoded of shape `(nb_samples, nb_classes)` or indices
                  of shape `(nb_samples,)`.
        :param reduction: Specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'.
                          'none': no reduction will be applied
                          'mean': the sum of the output will be divided by the number of elements in the output,
                          'sum': the output will be summed.
        :param training_mode: `True` for model set to training mode and `False` for model set to evaluation mode.
        :return: Loss values.
        :rtype: Format as expected by the `model`
        """
        raise NotImplementedError

        Compute the loss of the neural network for samples `x`.

        :param x: Samples of shape (nb_samples, nb_features) or (nb_samples, nb_pixels_1, nb_pixels_2,
                  nb_channels) or (nb_samples, nb_channels, nb_pixels_1, nb_pixels_2).
        :param y: Target values (class labels) one-hot-encoded of shape `(nb_samples, nb_classes)` or indices
                  of shape `(nb_samples,)`.
        :param reduction: Specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'.
                          'none': no reduction will be applied
                          'mean': the sum of the output will be divided by the number of elements in the output,
                          'sum': the output will be summed.
        :param training_mode: `True` for model set to training mode and `False` for model set to evaluation mode.
        :return: Loss values.
        :rtype: Format as expected by the `model`
        
art/estimators/certification/randomized_smoothing/tensorflow.py