code: def __init__(
      self,
      input_dimension: int,
      dimensions: _typing.Sequence[int],
      act: _typing.Optional[str],
      dropout: _typing.Optional[float],
      agg: str,
  ):
      super(_SAGE, self).__init__()
      if agg not in ("gcn", "pool", "mean", "lstm"):
          raise ValueError("Unsupported aggregator type")
      self.__convolution_layers: torch.nn.ModuleList = (
          torch.nn.ModuleList()
      )
      for layer, _dimension in enumerate(dimensions):
          self.__convolution_layers.append(
              SAGEConv(
                  input_dimension
                  if layer == 0
                  else dimensions[layer - 1],
                  _dimension,
                  agg,
              )
          )
      self._act: _typing.Optional[str] = act
      self._dropout: _typing.Optional[float] = dropout
  
file_path: AutoGL/autogl/module/model/encoders/_dgl/_sage.py
imports: import torch.nn.functional
  import typing
  import dgl
  from dgl.nn.pytorch.conv import SAGEConv
  from ..None import base_encoder, encoder_registry
  from ...None import _utils
label_desc: Use image node_id 1 to create a new _SAGE object from inherited base classes: torch.nn with example: obj = _SAGE(input_dimension, dimensions, act, dropout, agg)