code: def __init__(self, vocab, hidden_size, latent_size, embedding=None):
      nn.Module.__init__(self)
  
      self.hidden_size = hidden_size
      self.vocab_size = vocab.size()
      self.vocab = vocab
  
      if embedding is None:
          self.embedding = nn.Embedding(self.vocab_size, hidden_size)
      else:
          self.embedding = embedding
  
      self.dec_tree_edge_update = GRUUpdate(hidden_size)
  
      self.W = nn.Linear(latent_size + hidden_size, hidden_size)
      self.U = nn.Linear(latent_size + 2 * hidden_size, hidden_size)
      self.W_o = nn.Linear(hidden_size, self.vocab_size)
      self.U_s = nn.Linear(hidden_size, 1)
  
file_path: dgl/examples/pytorch/jtnn/jtnn/jtnn_dec.py
imports: import dgl.function
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl import batch, dfs_labeled_edges_generator, line_graph
  from .chemutils import enum_assemble_nx, get_mol
  from .mol_tree_nx import DGLMolTree
  from .nnutils import cuda, GRUUpdate, tocpu
label_desc: Use image node_id 1 to create a new DGLJTNNDecoder object from inherited base classes: nn with example: obj = DGLJTNNDecoder(vocab, hidden_size, latent_size, embedding)