code: def forward(self, enc_output, src_mask, return_attns=False):
      enc_output = self.dropout(
          self.position_enc(enc_output)
      )  # position embeding
      for enc_layer in self.layer_stack:
          enc_output = enc_layer(enc_output, slf_attn_mask=src_mask)
      enc_output = self.layer_norm(enc_output)
      return enc_output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal, XavierNormal
  import numpy
label_desc: Use image node_id 2 for calling the Transformer_Encoder obj's underlying member method code with example usage: obj.forward(enc_output, src_mask, return_attns) and returns: enc_output