docstr: img_metas: [label, valid_ratio]
docstr_tok: ["img_metas",":","[","label",",","valid_ratio","]"]
code: def forward(self, feat, targets=None):
      """
      img_metas: [label, valid_ratio]
      """
      holistic_feat = self.encoder(feat, targets)  # bsz c
  
      if self.training:
          label = targets[0]  # label
          final_out = self.decoder(
              feat, holistic_feat, label, img_metas=targets
          )
      else:
          final_out = self.decoder(
              feat,
              holistic_feat,
              label=None,
              img_metas=targets,
              train_mode=False,
          )
          # (bsz, seq_len, num_classes)
  
      return final_out
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the SARHead obj's underlying member method code with example usage: obj.forward(feat, targets) and returns: final_out