class_docstr: Graph neural networks are well-suited for session-based recommendation,
  because it can automatically extract features of session graphs with considerations of rich node connections.
class_docstr_tok: ["Graph","neural","networks","are","well-suited","for","session-based","recommendation",",","because","it","can","automatically","extract","features","of","session","graphs","with","considerations","of","rich","node","connections","."]
code: def __init__(self, embedding_size, step=1):
      super(GNN, self).__init__()
      self.step = step
      self.embedding_size = embedding_size
      self.input_size = embedding_size * 2
      self.gate_size = embedding_size * 3
      self.w_ih = Parameter(
          torch.Tensor(self.gate_size, self.input_size)
      )
      self.w_hh = Parameter(
          torch.Tensor(self.gate_size, self.embedding_size)
      )
      self.b_ih = Parameter(torch.Tensor(self.gate_size))
      self.b_hh = Parameter(torch.Tensor(self.gate_size))
  
      self.linear_edge_in = nn.Linear(
          self.embedding_size, self.embedding_size, bias=True
      )
      self.linear_edge_out = nn.Linear(
          self.embedding_size, self.embedding_size, bias=True
      )
  
      # parameters initialization
      self._reset_parameters()
  
imports: import math
  import numpy
  import torch
  from torch import nn
  from torch.nn import Parameter
  from torch.nn import functional
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.layers import TransformerEncoder
  from recbole.model.loss import EmbLoss, BPRLoss
label_desc: Use image node_id 1 to create a new GNN object from inherited base classes: nn with example: obj = GNN(embedding_size, step)