code: def __init__(
      self,
      in_dim,
      hid_dim,
      out_dim,
      num_layers=1,
      mode="cat",
      dropout=0.0,
  ):
      super(JKNet, self).__init__()
  
      self.mode = mode
      self.dropout = nn.Dropout(dropout)
      self.layers = nn.ModuleList()
      self.layers.append(GraphConv(in_dim, hid_dim, activation=F.relu))
      for _ in range(num_layers):
          self.layers.append(
              GraphConv(hid_dim, hid_dim, activation=F.relu)
          )
  
      if self.mode == "lstm":
          self.jump = JumpingKnowledge(mode, hid_dim, num_layers)
      else:
          self.jump = JumpingKnowledge(mode)
  
      if self.mode == "cat":
          hid_dim = hid_dim * (num_layers + 1)
  
      self.output = nn.Linear(hid_dim, out_dim)
      self.reset_params()
  
file_path: dgl/examples/pytorch/jknet/model.py
imports: import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn import GraphConv, JumpingKnowledge
label_desc: Use image node_id 1 to create a new JKNet object from inherited base classes: nn with example: obj = JKNet(in_dim, hid_dim, out_dim, num_layers, mode, dropout)