class_docstr: Mixin abstract base class defining additional functionality for estimators providing loss gradients. An estimator
  of this type can be combined with white-box attacks. This mixin abstract base class has to be mixed in with
  class `BaseEstimator`.
class_docstr_tok: ["Mixin","abstract","base","class","defining","additional","functionality","for","estimators","providing","loss","gradients",".","An","estimator","of","this","type","can","be","combined","with","white-box","attacks",".","This","mixin","abstract","base","class","has","to","be","mixed","in","with","class","`","BaseEstimator","`","."]
docstr: Compute the gradient of the loss function w.r.t. `x`.
  
  :param x: Samples.
  :type x: Format as expected by the `model`
  :param y: Target values.
  :type y: Format as expected by the `model`
  :return: Loss gradients w.r.t. `x` in the same format as `x`.
  :rtype: Format as expected by the `model`
code: def loss_gradient(self, x, y, **kwargs):
      """
      Compute the gradient of the loss function w.r.t. `x`.
  
      :param x: Samples.
      :type x: Format as expected by the `model`
      :param y: Target values.
      :type y: Format as expected by the `model`
      :return: Loss gradients w.r.t. `x` in the same format as `x`.
      :rtype: Format as expected by the `model`
      """
      raise NotImplementedError
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
label_desc: Use image node_id 1 for calling the LossGradientsMixin obj's underlying member method code with example usage: obj.loss_gradient(x, y) without return types