class_docstr: input: [b x 16 x 64 x in_planes]
  output: probability sequence: [b x T x num_classes]
code: def forward(self, x, embed):
      x, targets, lengths = x
      batch_size = paddle.shape(x)[0]
      # Decoder
      state = self.decoder.get_initial_state(embed)
      outputs = []
      for i in range(max(lengths)):
          if i == 0:
              y_prev = paddle.full(
                  shape=[batch_size], fill_value=self.num_classes
              )
          else:
              y_prev = targets[:, i - 1]
          output, state = self.decoder(x, state, y_prev)
          outputs.append(output)
      outputs = paddle.concat([_.unsqueeze(1) for _ in outputs], 1)
      return outputs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import paddle
  from paddle import nn
  from paddle.nn import functional
label_desc: Use image node_id 2 for calling the AttentionRecognitionHead obj's underlying member method code with example usage: obj.forward(x, embed) and returns: outputs