class_docstr: Estimator class for Keras models.
docstr: 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,)`.
  :return: Loss values.
  :rtype: Format as expected by the `model`
docstr_tok: ["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",",",")","`",".",":","return",":","Loss","values",".",":","rtype",":","Format","as","expected","by","the","`","model","`"]
code: def compute_loss(
      self, x: np.ndarray, y: np.ndarray, **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,)`.
      :return: Loss values.
      :rtype: Format as expected by the `model`
      """
      raise NotImplementedError
  
file_path: adversarial-robustness-toolbox/art/estimators/keras.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import TYPE_CHECKING
  import numpy
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin, LossGradientsMixin
label_desc: Use image node_id 4 for calling the KerasEstimator obj's underlying member method code with example usage: obj.compute_loss(x, y) without return types