code: def test_loss_gradient(self):
      grad = self.art_model.loss_gradient(
          self.x_test_diabetes[:4].astype(np.float32),
          self.y_test_diabetes[:4].astype(np.float32),
      )
      # grads are same shape as x (i.e., (10,4)), we are looking only at the first row
      grad_expected = [
          -49.4,
          129.9,
          -170.1,
          -116.6,
          -225.2,
          -171.9,
          174.6,
          -166.8,
          -223.9,
          -154.4,
      ]
      np.testing.assert_array_almost_equal(
          grad[0], grad_expected, decimal=1
      )
  
file_path: adversarial-robustness-toolbox/tests/estimators/regression/test_pytorch_regression.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from torch import nn, optim
  from art.estimators.regression.pytorch import PyTorchRegressor
  from tests.utils import TestBase, master_seed
label_desc: Use image node_id 7 for calling the TestPytorchRegressor obj's underlying member method code with example usage: obj.test_loss_gradient() without return types