class_docstr: A gated attention global pooling layer from the paper
  
  > [Gated Graph Sequence Neural Networks](https://arxiv.org/abs/1511.05493)<br>
  > Yujia Li et al.
  
  This layer computes:
  $$
      \X' = \sum\limits_{i=1}^{N} (\sigma(\X \W_1 + \b_1) \odot (\X \W_2 + \b_2))_i
  $$
  where \(\sigma\) is the sigmoid activation function.
  
  **Mode**: single, disjoint, mixed, batch.
  
  **Input**
  
  - Node features of shape `([batch], n_nodes, n_node_features)`;
  - Graph IDs of shape `(n_nodes, )` (only in disjoint mode);
  
  **Output**
  
  - Pooled node features of shape `(batch, channels)` (if single mode,
  shape will be `(1, channels)`).
  
  **Arguments**
  
  - `channels`: integer, number of output channels;
  - `bias_initializer`: initializer for the bias vectors;
  - `kernel_regularizer`: regularization applied to the kernel matrices;
  - `bias_regularizer`: regularization applied to the bias vectors;
  - `kernel_constraint`: constraint applied to the kernel matrices;
  - `bias_constraint`: constraint applied to the bias vectors.
class_docstr_tok: ["A","gated","attention","global","pooling","layer","from","the","paper",">","[","Gated","Graph","Sequence","Neural","Networks","]","(","https",":","\/\/arxiv.org\/abs\/1511.05493",")","<","br",">",">","Yujia","Li","et","al",".","This","layer","computes",":","$","$","\\X","'","=","\\sum\\limits_","{","i=1","}","^","{","N","}","(","\\sigma","(","\\X","\\W_1","+","\\b_1",")","\\odot","(","\\X","\\W_2","+","\\b_2",")",")","_i","$","$","where","\\","(","\\sigma\\",")","is","the","sigmoid","activation","function",".","*","*","Mode","*","*",":","single",",","disjoint",",","mixed",",","batch",".","*","*","Input","*","*","-","Node","features","of","shape","`","(","[","batch","]",",","n_nodes",",","n_node_features",")","`",";","-","Graph","IDs","of","shape","`","(","n_nodes",",",")","`","(","only","in","disjoint","mode",")",";","*","*","Output","*","*","-","Pooled","node","features","of","shape","`","(","batch",",","channels",")","`","(","if","single","mode",",","shape","will","be","`","(","1",",","channels",")","`",")",".","*","*","Arguments","*","*","-","`","channels","`",":","integer",",","number","of","output","channels",";","-","`","bias_initializer","`",":","initializer","for","the","bias","vectors",";","-","`","kernel_regularizer","`",":","regularization","applied","to","the","kernel","matrices",";","-","`","bias_regularizer","`",":","regularization","applied","to","the","bias","vectors",";","-","`","kernel_constraint","`",":","constraint","applied","to","the","kernel","matrices",";","-","`","bias_constraint","`",":","constraint","applied","to","the","bias","vectors","."]
code: def __init__(
      self,
      channels,
      kernel_initializer="glorot_uniform",
      bias_initializer="zeros",
      kernel_regularizer=None,
      bias_regularizer=None,
      kernel_constraint=None,
      bias_constraint=None,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.channels = channels
      self.kernel_initializer = initializers.get(kernel_initializer)
      self.bias_initializer = initializers.get(bias_initializer)
      self.kernel_regularizer = regularizers.get(kernel_regularizer)
      self.bias_regularizer = regularizers.get(bias_regularizer)
      self.kernel_constraint = constraints.get(kernel_constraint)
      self.bias_constraint = constraints.get(bias_constraint)
  
imports: import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras import constraints, initializers, regularizers
  from tensorflow.keras.layers import Dense, Layer
  from spektral.layers import ops
label_desc: Use image node_id 1 to create a new GlobalAttentionPool object from inherited base classes: GlobalPool with example: obj = GlobalAttentionPool(channels, kernel_initializer, bias_initializer, kernel_regularizer, bias_regularizer, kernel_constraint, bias_constraint)