class_docstr: Graph Attention (GAT) layer. The base implementation is taken from
  https://github.com/danielegrattarola/keras-gat,
  with some modifications added for ease of use.
  
  Based on the original paper: Graph Attention Networks. P. Veličković et al. ICLR 2018 https://arxiv.org/abs/1710.10903
  
  Notes:
    - The inputs are tensors with a batch dimension of 1:
      Keras requires this batch dimension, and for full-batch methods
      we only have a single "batch".
  
    - There are two inputs required, the node features,
      and the graph adjacency matrix
  
    - This does not add self loops to the adjacency matrix, you should preprocess
      the adjacency matrix to add self-loops
  
  .. seealso:: :class:`.GAT` combines several of these layers, and :class:`.GraphAttentionSparse` supports a sparse adjacency matrix.
  
  Args:
      F_out (int): dimensionality of output feature vectors
      attn_heads (int or list of int): number of attention heads
      attn_heads_reduction (str): reduction applied to output features of each attention head, ``concat`` or ``average``.
          ``average`` should be applied in the final prediction layer of the model (Eq. 6 of the paper).
      in_dropout_rate (float): dropout rate applied to features
      attn_dropout_rate (float): dropout rate applied to attention coefficients
      activation (str): nonlinear activation applied to layer's output to obtain output features (eq. 4 of the GAT paper)
      final_layer (bool): Deprecated, use ``tf.gather`` or :class:`.GatherIndices`
      use_bias (bool): toggles an optional bias
      saliency_map_support (bool): If calculating saliency maps using the tools in
          stellargraph.interpretability.saliency_maps this should be True. Otherwise this should be False (default).
      kernel_initializer (str or func, optional): The initialiser to use for the head weights.
      kernel_regularizer (str or func, optional): The regulariser to use for the head weights.
      kernel_constraint (str or func, optional): The constraint to use for the head weights.
      bias_initializer (str or func, optional): The initialiser to use for the head bias.
      bias_regularizer (str or func, optional): The regulariser to use for the head bias.
      bias_constraint (str or func, optional): The constraint to use for the head bias.
      attn_kernel_initializer (str or func, optional): The initialiser to use for the attention weights.
      attn_kernel_regularizer (str or func, optional): The regulariser to use for the attention weights.
      attn_kernel_constraint (str or func, optional): The constraint to use for the attention weights.
class_docstr_tok: ["Graph","Attention","(","GAT",")","layer",".","The","base","implementation","is","taken","from","https",":","\/\/github.com\/danielegrattarola\/keras-gat",",","with","some","modifications","added","for","ease","of","use",".","Based","on","the","original","paper",":","Graph","Attention","Networks",".","P.","Veli\u010dkovi\u0107","et","al",".","ICLR","2018","https",":","\/\/arxiv.org\/abs\/1710.10903","Notes",":","-","The","inputs","are","tensors","with","a","batch","dimension","of","1",":","Keras","requires","this","batch","dimension",",","and","for","full-batch","methods","we","only","have","a","single","``","batch","''",".","-","There","are","two","inputs","required",",","the","node","features",",","and","the","graph","adjacency","matrix","-","This","does","not","add","self","loops","to","the","adjacency","matrix",",","you","should","preprocess","the","adjacency","matrix","to","add","self-loops","..","seealso",":",":",":","class",":","`",".GAT","`","combines","several","of","these","layers",",","and",":","class",":","`",".GraphAttentionSparse","`","supports","a","sparse","adjacency","matrix",".","Args",":","F_out","(","int",")",":","dimensionality","of","output","feature","vectors","attn_heads","(","int","or","list","of","int",")",":","number","of","attention","heads","attn_heads_reduction","(","str",")",":","reduction","applied","to","output","features","of","each","attention","head",",","``","concat","``","or","``","average","``",".","``","average","``","should","be","applied","in","the","final","prediction","layer","of","the","model","(","Eq",".","6","of","the","paper",")",".","in_dropout_rate","(","float",")",":","dropout","rate","applied","to","features","attn_dropout_rate","(","float",")",":","dropout","rate","applied","to","attention","coefficients","activation","(","str",")",":","nonlinear","activation","applied","to","layer","'s","output","to","obtain","output","features","(","eq",".","4","of","the","GAT","paper",")","final_layer","(","bool",")",":","Deprecated",",","use","``","tf.gather","``","or",":","class",":","`",".GatherIndices","`","use_bias","(","bool",")",":","toggles","an","optional","bias","saliency_map_support","(","bool",")",":","If","calculating","saliency","maps","using","the","tools","in","stellargraph.interpretability.saliency_maps","this","should","be","True",".","Otherwise","this","should","be","False","(","default",")",".","kernel_initializer","(","str","or","func",",","optional",")",":","The","initialiser","to","use","for","the","head","weights",".","kernel_regularizer","(","str","or","func",",","optional",")",":","The","regulariser","to","use","for","the","head","weights",".","kernel_constraint","(","str","or","func",",","optional",")",":","The","constraint","to","use","for","the","head","weights",".","bias_initializer","(","str","or","func",",","optional",")",":","The","initialiser","to","use","for","the","head","bias",".","bias_regularizer","(","str","or","func",",","optional",")",":","The","regulariser","to","use","for","the","head","bias",".","bias_constraint","(","str","or","func",",","optional",")",":","The","constraint","to","use","for","the","head","bias",".","attn_kernel_initializer","(","str","or","func",",","optional",")",":","The","initialiser","to","use","for","the","attention","weights",".","attn_kernel_regularizer","(","str","or","func",",","optional",")",":","The","regulariser","to","use","for","the","attention","weights",".","attn_kernel_constraint","(","str","or","func",",","optional",")",":","The","constraint","to","use","for","the","attention","weights","."]
docstr: Gets class configuration for Keras serialization
docstr_tok: ["Gets","class","configuration","for","Keras","serialization"]
code: def get_config(self):
      """
      Gets class configuration for Keras serialization
  
      """
      config = {
          "units": self.units,
          "attn_heads": self.attn_heads,
          "attn_heads_reduction": self.attn_heads_reduction,
          "in_dropout_rate": self.in_dropout_rate,
          "attn_dropout_rate": self.attn_dropout_rate,
          "activation": activations.serialize(self.activation),
          "use_bias": self.use_bias,
          "saliency_map_support": self.saliency_map_support,
          "kernel_initializer": initializers.serialize(
              self.kernel_initializer
          ),
          "kernel_regularizer": regularizers.serialize(
              self.kernel_regularizer
          ),
          "kernel_constraint": constraints.serialize(
              self.kernel_constraint
          ),
          "bias_initializer": initializers.serialize(
              self.bias_initializer
          ),
          "bias_regularizer": regularizers.serialize(
              self.bias_regularizer
          ),
          "bias_constraint": constraints.serialize(
              self.bias_constraint
          ),
          "attn_kernel_initializer": initializers.serialize(
              self.attn_kernel_initializer
          ),
          "attn_kernel_regularizer": regularizers.serialize(
              self.attn_kernel_regularizer
          ),
          "attn_kernel_constraint": constraints.serialize(
              self.attn_kernel_constraint
          ),
      }
      base_config = super().get_config()
      return {**base_config, **config}
  
imports: import warnings
  import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras import activations, constraints, initializers, regularizers
  from tensorflow.keras.layers import Input, Layer, Dropout, LeakyReLU, Lambda, Reshape
  from ..mapper import FullBatchNodeGenerator, FullBatchGenerator, ClusterNodeGenerator
  from .misc import SqueezedSparseConversion, deprecated_model_function, GatherIndices
label_desc: Use image node_id 2 for calling the GraphAttention obj's underlying member method code with example usage: obj.get_config() and returns: dict