class_docstr: GNN Aggregator layer
class_docstr_tok: ["GNN","Aggregator","layer"]
code: def __init__(self, input_dim, output_dim, dropout, aggregator_type):
      super(Aggregator, self).__init__()
      self.input_dim = input_dim
      self.output_dim = output_dim
      self.dropout = dropout
      self.aggregator_type = aggregator_type
  
      self.message_dropout = nn.Dropout(dropout)
  
      if self.aggregator_type == "gcn":
          self.W = nn.Linear(self.input_dim, self.output_dim)
      elif self.aggregator_type == "graphsage":
          self.W = nn.Linear(self.input_dim * 2, self.output_dim)
      elif self.aggregator_type == "bi":
          self.W1 = nn.Linear(self.input_dim, self.output_dim)
          self.W2 = nn.Linear(self.input_dim, self.output_dim)
      else:
          raise NotImplementedError
  
      self.activation = nn.LeakyReLU()
  
imports: import numpy
  import scipy.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new Aggregator object from inherited base classes: nn with example: obj = Aggregator(input_dim, output_dim, dropout, aggregator_type)