code: def forward(self, enc_output):
      # enc_output: b,256,512
      reading_order = paddle.arange(self.character_len, dtype="int64")
      reading_order = reading_order.unsqueeze(0).expand(
          [enc_output.shape[0], self.character_len]
      )  # (S,) -> (B, S)
      reading_order = self.f0_embedding(reading_order)  # b,25,512
  
      # calculate attention
      reading_order = paddle.transpose(reading_order, perm=[0, 2, 1])
      t = self.w0(reading_order)  # b,512,256
      t = self.active(
          paddle.transpose(t, perm=[0, 2, 1]) + self.wv(enc_output)
      )  # b,256,512
      t = self.we(t)  # b,256,25
      t = self.softmax(paddle.transpose(t, perm=[0, 2, 1]))  # b,25,256
      g_output = paddle.bmm(t, enc_output)  # b,25,512
      return g_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 PP_layer obj's underlying member method code with example usage: obj.forward(enc_output) and returns: g_output