code: def __init__(
      self,
      vocab_size,
      type_size,
      max_position_seq_len,
      num_layers,
      n_head,
      hidden_size,
      attn_dropout,
      act_dropout,
  ):
      super(Plato2Encoder, self).__init__()
  
      self.n_head = n_head
  
      self.word_embedding_layer = nn.Embedding(vocab_size, hidden_size)
      self.sent_embedding_layer = nn.Embedding(type_size, hidden_size)
      self.pos_embedding_layer = nn.Embedding(
          max_position_seq_len, hidden_size
      )
  
      self.encoder_layers = []
      for i in range(num_layers):
          encoder_layer = Plato2EncoderLayer(
              n_head, hidden_size, attn_dropout, act_dropout
          )
          self.encoder_layers.append(encoder_layer)
          self.add_sublayer("layers." + str(i), encoder_layer)
      self.post_encoder_layer_norm = nn.LayerNorm(hidden_size)
  
      self.dropout_layer = nn.Dropout(act_dropout)
  
imports: from collections import namedtuple
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new Plato2Encoder object from inherited base classes: nn with example: obj = Plato2Encoder(vocab_size, type_size, max_position_seq_len, num_layers, n_head, hidden_size, attn_dropout, act_dropout)