code: def __init__(
      self,
      encoder,
      decoder,
      src_embed,
      tgt_embed,
      pos_enc,
      generator,
      h,
      d_k,
  ):
      super(Transformer, self).__init__()
      self.encoder, self.decoder = encoder, decoder
      self.src_embed, self.tgt_embed = src_embed, tgt_embed
      self.pos_enc = pos_enc
      self.generator = generator
      self.h, self.d_k = h, d_k
      self.att_weight_map = None
  
imports: from .config import *
  from .act import *
  from .attention import *
  from .viz import *
  from .layers import *
  from .functions import *
  from .embedding import *
  import threading
  import dgl.function
  import torch
  import torch.nn.init
label_desc: Use image node_id 1 to create a new Transformer object from inherited base classes: nn with example: obj = Transformer(encoder, decoder, src_embed, tgt_embed, pos_enc, generator, h, d_k)