code: def __init__(self, in_size, out_size, norm_dict, dropout):
      super(NGCFLayer, self).__init__()
      self.in_size = in_size
      self.out_size = out_size
  
      # weights for different types of messages
      self.W1 = nn.Linear(in_size, out_size, bias=True)
      self.W2 = nn.Linear(in_size, out_size, bias=True)
  
      # leaky relu
      self.leaky_relu = nn.LeakyReLU(0.2)
  
      # dropout layer
      self.dropout = nn.Dropout(dropout)
  
      # initialization
      torch.nn.init.xavier_uniform_(self.W1.weight)
      torch.nn.init.constant_(self.W1.bias, 0)
      torch.nn.init.xavier_uniform_(self.W2.weight)
      torch.nn.init.constant_(self.W2.bias, 0)
  
      # norm
      self.norm_dict = norm_dict
  
file_path: dgl/examples/pytorch/NGCF/NGCF/model.py
imports: import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new NGCFLayer object from inherited base classes: nn with example: obj = NGCFLayer(in_size, out_size, norm_dict, dropout)