code: def __init__(
      self,
      input_dimension: int,
      per_head_output_dimensions: _typing.Sequence[int],
      num_hidden_heads: int,
      num_output_heads: int,
      _dropout: float,
      _act: _typing.Optional[str],
      concat_last: bool = True,
  ):
      super(_GAT, self).__init__()
      self._dropout: float = _dropout
      self._act: _typing.Optional[str] = _act
      total_output_dimensions: _typing.Sequence[
          int
      ] = GATUtils.to_total_hidden_dimensions(
          per_head_output_dimensions,
          num_hidden_heads,
          num_output_heads,
          concat_last=concat_last,
      )
      num_layers = len(per_head_output_dimensions)
      self.__convolution_layers: torch.nn.ModuleList = (
          torch.nn.ModuleList()
      )
      for layer in range(len(per_head_output_dimensions)):
          self.__convolution_layers.append(
              GATConv(
                  input_dimension
                  if layer == 0
                  else total_output_dimensions[layer - 1],
                  per_head_output_dimensions[layer],
                  num_hidden_heads
                  if layer < num_layers - 1
                  else num_output_heads,
                  dropout=_dropout,
                  concat=True
                  if layer < num_layers - 1 or concat_last
                  else False,
              )
          )
  
file_path: AutoGL/autogl/module/model/encoders/_pyg/_gat.py
imports: import logging
  import torch.nn.functional
  import typing
  import torch_geometric
  from torch_geometric.nn.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, per_head_output_dimensions, num_hidden_heads, num_output_heads, _dropout, _act, concat_last)