class_docstr: Class to compute the saliency maps based on the vanilla gradient w.r.t the adjacency and the feature matrix.
  
  Args:
      model (Keras model object): The differentiable graph model object.
          model.input should contain two tensors:
              - features (Numpy array): The placeholder of the feature matrix.
              - adj (Numpy array): The placeholder of the adjacency matrix.
          model.output (Keras tensor): The tensor of model prediction output.
              This is typically the logit or softmax output.
class_docstr_tok: ["Class","to","compute","the","saliency","maps","based","on","the","vanilla","gradient","w.r.t","the","adjacency","and","the","feature","matrix",".","Args",":","model","(","Keras","model","object",")",":","The","differentiable","graph","model","object",".","model.input","should","contain","two","tensors",":","-","features","(","Numpy","array",")",":","The","placeholder","of","the","feature","matrix",".","-","adj","(","Numpy","array",")",":","The","placeholder","of","the","adjacency","matrix",".","model.output","(","Keras","tensor",")",":","The","tensor","of","model","prediction","output",".","This","is","typically","the","logit","or","softmax","output","."]
code: def compute_node_gradients(self, node_mask_tensors):
      for i, x in enumerate(node_mask_tensors):
          if not isinstance(x, tf.Tensor):
              node_mask_tensors[i] = tf.convert_to_tensor(x)
  
      (
          X_val,
          out_indices,
          A_val,
          _,
          class_of_interest,
      ) = node_mask_tensors
      model_input = [X_val, out_indices, A_val]
  
      with tf.GradientTape() as tape:
          tape.watch(X_val)
          output = self.model(model_input)
  
          cost_value = K.gather(output[0, 0], class_of_interest)
  
      node_gradients = tape.gradient(cost_value, X_val)
  
      return node_gradients
  
file_path: stellargraph/stellargraph/interpretability/saliency_maps/saliency_gat.py
imports: import numpy
  from tensorflow.keras import backend
  import scipy.sparse
  from stellargraph.mapper import FullBatchSequence
  import tensorflow
label_desc: Use image node_id 2 for calling the GradientSaliencyGAT obj's underlying member method code with example usage: obj.compute_node_gradients(node_mask_tensors) and returns: node_gradients