code: def __init__(
      self, d_model, vocab, padding_idx=None, scale_embedding=True
  ):
      super(Embeddings, self).__init__()
      self.embedding = nn.Embedding(
          vocab, d_model, padding_idx=padding_idx
      )
      w0 = np.random.normal(
          0.0, d_model**-0.5, (vocab, d_model)
      ).astype(np.float32)
      self.embedding.weight.set_value(w0)
      self.d_model = d_model
      self.scale_embedding = scale_embedding
  
imports: import math
  import paddle
  from paddle import nn
  import paddle.nn.functional
  from paddle.nn import LayerList
  from paddle.nn import Dropout, Linear, LayerNorm
  import numpy
  from ppocr.modeling.backbones.rec_svtrnet import Mlp, zeros_, ones_
  from paddle.nn.initializer import XavierNormal
label_desc: Use image node_id 1 to create a new Embeddings object from inherited base classes: nn with example: obj = Embeddings(d_model, vocab, padding_idx, scale_embedding)