class_docstr: Wrapper class for importing Keras regression models.
class_docstr_tok: ["Wrapper","class","for","importing","Keras","regression","models","."]
docstr: Returns the gradient of the nn_function with respect to model input
  
  :param nn_function: an intermediate tensor representation of the function to differentiate
  :type nn_function: a Keras tensor
  :param tensors: the tensors or variables to differentiate with respect to
  :type tensors: `list`
  :param input_values: the inputs to evaluate the gradient
  :type input_values: `list`
  :param name: The name of the function. Functions of the same name are cached
  :type name: `str`
  :return: the gradient of the function w.r.t vars
  :rtype: `np.ndarray`
docstr_tok: ["Returns","the","gradient","of","the","nn_function","with","respect","to","model","input",":","param","nn_function",":","an","intermediate","tensor","representation","of","the","function","to","differentiate",":","type","nn_function",":","a","Keras","tensor",":","param","tensors",":","the","tensors","or","variables","to","differentiate","with","respect","to",":","type","tensors",":","`","list","`",":","param","input_values",":","the","inputs","to","evaluate","the","gradient",":","type","input_values",":","`","list","`",":","param","name",":","The","name","of","the","function",".","Functions","of","the","same","name","are","cached",":","type","name",":","`","str","`",":","return",":","the","gradient","of","the","function","w.r.t","vars",":","rtype",":","`","np.ndarray","`"]
code: def custom_loss_gradient(
      self, nn_function, tensors, input_values, name="default"
  ):
      """
      Returns the gradient of the nn_function with respect to model input
  
      :param nn_function: an intermediate tensor representation of the function to differentiate
      :type nn_function: a Keras tensor
      :param tensors: the tensors or variables to differentiate with respect to
      :type tensors: `list`
      :param input_values: the inputs to evaluate the gradient
      :type input_values: `list`
      :param name: The name of the function. Functions of the same name are cached
      :type name: `str`
      :return: the gradient of the function w.r.t vars
      :rtype: `np.ndarray`
      """
      if self.is_tensorflow:
          import tensorflow.keras.backend as k  # pylint: disable=E0611
      else:
          import keras.backend as k
  
      if not hasattr(self, "_custom_loss_func"):
          self._custom_loss_func = {}
  
      if name not in self._custom_loss_func:
          grads = k.gradients(nn_function, tensors[0])[0]
          self._custom_loss_func[name] = k.function(tensors, [grads])
  
      outputs = self._custom_loss_func[name]
      return outputs(input_values)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import time
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  import six
  from art import config
  from art.estimators.keras import KerasEstimator
  from art.estimators.regression.regressor import RegressorMixin
label_desc: Use image node_id 13 for calling the KerasRegressor obj's underlying member method code with example usage: obj.custom_loss_gradient(nn_function, tensors, input_values, name) and returns: outputs