class_docstr: A SaliencyMask class that implements the integrated gradients method.
class_docstr_tok: ["A","SaliencyMask","class","that","implements","the","integrated","gradients","method","."]
code: def _compute_gradients(self, model_input, class_of_interest, wrt):
      class_of_interest = tf.convert_to_tensor(class_of_interest)
  
      with tf.GradientTape() as tape:
          tape.watch(wrt)
  
          output = self._model(model_input)
  
          cost_value = K.gather(output[0, 0], class_of_interest)
  
      gradients = tape.gradient(cost_value, wrt)
  
      return gradients
  
file_path: stellargraph/stellargraph/interpretability/saliency_maps/integrated_gradients.py
imports: import numpy
  from tensorflow.keras import backend
  from scipy.sparse import csr_matrix
  import tensorflow
  from stellargraph.mapper import SparseFullBatchSequence, FullBatchSequence
label_desc: Use image node_id 5 for calling the IntegratedGradients obj's underlying member method code with example usage: obj._compute_gradients(model_input, class_of_interest, wrt) and returns: gradients