class_docstr: input: [b x 16 x 64 x in_planes]
  output: probability sequence: [b x T x num_classes]
code: def sample(self, x):
      x, _, _ = x
      batch_size = x.size(0)
      # Decoder
      state = paddle.zeros([1, batch_size, self.sDim])
  
      predicted_ids, predicted_scores = [], []
      for i in range(self.max_len_labels):
          if i == 0:
              y_prev = paddle.full(
                  shape=[batch_size], fill_value=self.num_classes
              )
          else:
              y_prev = predicted
  
          output, state = self.decoder(x, state, y_prev)
          output = F.softmax(output, axis=1)
          score, predicted = output.max(1)
          predicted_ids.append(predicted.unsqueeze(1))
          predicted_scores.append(score.unsqueeze(1))
      predicted_ids = paddle.concat([predicted_ids, 1])
      predicted_scores = paddle.concat([predicted_scores, 1])
      # return predicted_ids.squeeze(), predicted_scores.squeeze()
      return predicted_ids, predicted_scores
  
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 3 for calling the AttentionRecognitionHead obj's underlying member method code with example usage: obj.sample(x) and returns: predicted_ids,  predicted_scores