docstr: use pre-trained LM header for generation.
docstr_tok: ["use","pre-trained","LM","header","for","generation","."]
code: def forward(
      self,
      caps,
      cmasks,
      vfeats,
      vmasks,
      attention_mask,
      video_label=None,
      text_label=None,
      **kwargs,
  ):
      """use pre-trained LM header for generation."""
      attention_mask, token_type_ids = self._mm_on_the_fly(
          cmasks, vmasks, attention_mask
      )
  
      outputs = self.mm_encoder(
          input_ids=caps,
          input_video_embeds=vfeats,
          attention_mask=attention_mask,
          token_type_ids=token_type_ids,
          masked_lm_labels=text_label,
      )
      return {"logits": outputs[0]}
  
file_path: fairseq/examples/MMPT/mmpt/models/mmfusionnlg.py
imports: import torch
  from torch.nn import functional
  from typing import Optional, Iterable
  from .mmfusion import MMFusion
  from .transformermodel import MMBertModel
  from ..modules import VideoTokenMLP
label_desc: Use image node_id 2 for calling the MMFusionNLG obj's underlying member method code with example usage: obj.forward(caps, cmasks, vfeats, vmasks, attention_mask, video_label, text_label) and returns: dict