code: def forward(
      self,
      input_ids=None,
      attention_mask=None,
      token_type_ids=None,
      labels=None,
      images=None,
      aux_imgs=None,
      rcnn_imgs=None,
  ):
      bsz = input_ids.size(0)
  
      output = self.model(
          input_ids=input_ids,
          attention_mask=attention_mask,
          token_type_ids=token_type_ids,
          pixel_values=images,
          aux_values=aux_imgs,
          rcnn_values=rcnn_imgs,
          return_dict=True,
      )
  
      sequence_output = output.last_hidden_state  # bsz, len, hidden
      sequence_output = self.dropout(
          sequence_output
      )  # bsz, len, hidden
      emissions = self.fc(sequence_output)  # bsz, len, labels
  
      logits = self.crf.decode(emissions, attention_mask.byte())
      loss = None
      if labels is not None:
          loss = -1 * self.crf(
              emissions,
              labels,
              mask=attention_mask.byte(),
              reduction="mean",
          )  # 去掉CLS
          return logits, loss
      return logits, None
  
file_path: DeepKE/src/deepke/name_entity_re/multimodal/models/IFA_model.py
imports: import torch
  from torch import nn
  from torchcrf import CRF
  import torch.nn.functional
  from .modeling_IFA import IFAModel
  from transformers import BertConfig, BertModel, CLIPConfig, CLIPModel
label_desc: Use image node_id 2 for calling the IFANERCRFModel obj's underlying member method code with example usage: obj.forward(input_ids, attention_mask, token_type_ids, labels, images, aux_imgs, rcnn_imgs) and returns: logits,  None, logits,  loss