code: def forward(self, x, targets=None, embed=None):
      return_dict = {}
      embedding_vectors = self.embeder(x)
  
      if self.training:
          rec_targets, rec_lengths, _ = targets
          rec_pred = self.decoder(
              [x, rec_targets, rec_lengths], embedding_vectors
          )
          return_dict["rec_pred"] = rec_pred
          return_dict["embedding_vectors"] = embedding_vectors
      else:
          rec_pred, rec_pred_scores = self.decoder.beam_search(
              x, self.beam_width, self.eos, embedding_vectors
          )
          return_dict["rec_pred"] = rec_pred
          return_dict["rec_pred_scores"] = rec_pred_scores
          return_dict["embedding_vectors"] = embedding_vectors
  
      return return_dict
  
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 AsterHead obj's underlying member method code with example usage: obj.forward(x, targets, embed) and returns: return_dict