class_docstr: Graph Sequence to sequence prediction framework
  Support multiple backbone GNN. Mainly used for traffic prediction.
  
  Parameter
  ==========
  in_feats : int
      number of input features
  
  out_feats : int
      number of prediction output features
  
  seq_len : int
      input and predicted sequence length
  
  num_layers : int
      vertical number of layers in encoder and decoder unit
  
  net : torch.nn.Module
      Message passing GNN as backbone
  
  decay_steps : int
      number of steps for the teacher forcing probability to decay
class_docstr_tok: ["Graph","Sequence","to","sequence","prediction","framework","Support","multiple","backbone","GNN",".","Mainly","used","for","traffic","prediction",".","Parameter","==========","in_feats",":","int","number","of","input","features","out_feats",":","int","number","of","prediction","output","features","seq_len",":","int","input","and","predicted","sequence","length","num_layers",":","int","vertical","number","of","layers","in","encoder","and","decoder","unit","net",":","torch.nn.Module","Message","passing","GNN","as","backbone","decay_steps",":","int","number","of","steps","for","the","teacher","forcing","probability","to","decay"]
code: def encode(self, g, inputs, device):
      hidden_states = [
          torch.zeros(g.num_nodes(), self.out_feats).to(device)
          for _ in range(self.num_layers)
      ]
      for i in range(self.seq_len):
          _, hidden_states = self.encoder(g, inputs[i], hidden_states)
  
      return hidden_states
  
imports: import dgl
  import dgl.function
  import dgl.nn
  import numpy
  import scipy.sparse
  import torch
  import torch.nn
  from dgl.base import DGLError
  from dgl.nn.functional import edge_softmax
label_desc: Use image node_id 3 for calling the GraphRNN obj's underlying member method code with example usage: obj.encode(g, inputs, device) and returns: hidden_states