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","."]
docstr: Args:
      model (Keras model object): The Keras GAT model.
      generator (FullBatchSequence object): The generator from which we extract the feature and adjacency matirx.
docstr_tok: ["Args",":","model","(","Keras","model","object",")",":","The","Keras","GAT","model",".","generator","(","FullBatchSequence","object",")",":","The","generator","from","which","we","extract","the","feature","and","adjacency","matirx","."]
code: def __init__(self, model, generator):
      """
      Args:
          model (Keras model object): The Keras GAT model.
          generator (FullBatchSequence object): The generator from which we extract the feature and adjacency matirx.
      """
      # The placeholders for features and adjacency matrix (model input):
      if not isinstance(generator, FullBatchSequence):
          raise TypeError(
              "The generator supplied has to be an object of FullBatchSequence."
          )
      self.model = model
      # Collect variables for IG
      self.deltas = []
      self.non_exist_edges = []
      for var in model.non_trainable_weights:
          if "ig_delta" in var.name:
              self.deltas.append(var)
          if "ig_non_exist_edge" in var.name:
              self.non_exist_edges.append(var)
  
      features_t, output_indices_t, adj_t = model.input
      # Placeholder for class prediction (model output):
      output = self.model.output
      self.A = generator.A_dense
      self.X = generator.features
      self.is_sparse = K.is_sparse(adj_t)
  
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 1 to create a new GradientSaliencyGAT object  with example: obj = GradientSaliencyGAT(model, generator)