code: def __init__(
      self,
      input_dimension: int,
      dimensions: _typing.Sequence[int],
      num_hidden_heads: int,
      num_output_heads: int,
      act: _typing.Optional[str],
      dropout: _typing.Optional[float],
      concat_last: bool = True,
  ):
      super(GAT, self).__init__()
      dimensions = GATUtils.to_total_hidden_dimensions(
          dimensions,
          num_hidden_heads,
          num_output_heads,
          concat_last=concat_last,
      )
      num_layers: int = len(dimensions)
      self.__convolutions: torch.nn.ModuleList = torch.nn.ModuleList()
      for layer in range(len(dimensions)):
          num_heads: int = (
              num_hidden_heads
              if layer < num_layers - 1
              else num_output_heads
          )
          if dimensions[layer] % num_heads != 0:
              raise ValueError
          self.__convolutions.append(
              GATConv(
                  dimensions[layer - 1]
                  if layer > 0
                  else input_dimension,
                  dimensions[layer] // num_heads,
                  num_heads,
                  dropout,
                  dropout,
              )
          )
      self.__activation: _typing.Optional[str] = act
      self.__concat_last = concat_last
  
file_path: AutoGL/autogl/module/model/encoders/_dgl/_gat.py
imports: import logging
  import torch.nn.functional
  import typing
  import dgl
  from dgl.nn.pytorch.conv import GATConv
  from ..None import base_encoder, encoder_registry
  from ...None import _utils
label_desc: Use image node_id 1 to create a new GAT object from inherited base classes: torch.nn with example: obj = GAT(input_dimension, dimensions, num_hidden_heads, num_output_heads, act, dropout, concat_last)