code: def __init__(
      self,
      src_vocab_size,
      src_emb_dim,
      src_max_len,
      dropout_rate=0,
      bos_idx=0,
      word_emb_param_name=None,
      pos_enc_param_name=None,
  ):
      super(PrepareEncoder, self).__init__()
      self.src_emb_dim = src_emb_dim
      self.src_max_len = src_max_len
      self.emb = paddle.nn.Embedding(
          num_embeddings=self.src_max_len,
          embedding_dim=self.src_emb_dim,
      )
      self.dropout_rate = dropout_rate
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  from paddle import ParamAttr, nn
  from paddle import nn, ParamAttr
  from paddle.nn import functional
  import numpy
label_desc: Use image node_id 1 to create a new PrepareEncoder object from inherited base classes: nn with example: obj = PrepareEncoder(src_vocab_size, src_emb_dim, src_max_len, dropout_rate, bos_idx, word_emb_param_name, pos_enc_param_name)