class_docstr: Masked Region Feature Regression transformer head,
  From uniter paper https://arxiv.org/pdf/1909.11740.pdf
  For an example usage take a look at the unit test.
code: def forward(
      self,
      sequence_output: Tensor,
      processed_sample_list: Dict[str, Dict[str, Tensor]],
  ) -> Dict[str, Dict[str, Tensor]]:
      output_dict = {}
  
      assert (
          self.mrfr_target_key in processed_sample_list
          and processed_sample_list[self.mrfr_target_key] is not None
      ), (
          f"MRFR pretraining requires {self.mrfr_target_key} to be in sample "
          + "list with value not None."
      )
      # (bs*num_feat, img_dim)  Look at unit test for example usage!
      feat_targets = processed_sample_list[self.mrfr_target_key]
  
      assert (
          self.mrfr_mask_key in processed_sample_list
          and processed_sample_list[self.mrfr_mask_key] is not None
      ), (
          f"MRFR pretraining requires {self.mrfr_mask_key} to be in sample "
          + "list with value not None."
      )
      # (bs, num_feat)
      image_region_masks = processed_sample_list[self.mrfr_mask_key]
  
      masked_output = compute_masked_hidden(
          sequence_output, image_region_masks
      )
      hidden_states = self.feat_regress(masked_output)
      prediction_feat = F.linear(
          hidden_states,
          self.linear_proj_weight.t(),
          self.linear_proj_bias,
      )
      mrfr_loss = F.mse_loss(
          prediction_feat, feat_targets, reduction="mean"
      )
  
      output_dict["losses"] = {}
      output_dict["losses"][self.loss_name] = mrfr_loss
      return output_dict
  
file_path: mmf/mmf/models/transformers/heads/mrfr.py
imports: from typing import Dict
  import torch
  import torch.nn.functional
  from mmf.common.registry import registry
  from mmf.models.transformers.heads.utils import compute_masked_hidden
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling the MRFR obj's underlying member method code with example usage: obj.forward(sequence_output, processed_sample_list) and returns: output_dict