code: def _fix_proposal_generator(self, config: omegaconf.DictConfig):
      in_channels = [
          val.channels
          for key, val in self.backbone.output_shape().items()
      ]
      assert (
          len(set(in_channels)) == 1
      ), "Each level must have the same channel!"
      in_channels = in_channels[0]
      if config.MODEL.PROPOSAL_GENERATOR.HIDDEN_CHANNELS == -1:
          hid_channels = in_channels
      else:
          hid_channels = config.MODEL.PROPOSAL_GENERATOR.HIDDEN_CHANNELS
      self.proposal_generator.rpn_head.conv = nn.Conv2d(
          in_channels, hid_channels, kernel_size=3, stride=1, padding=1
      )
      shape = self.backbone.output_shape()
      features = config.MODEL.RPN.IN_FEATURES
      example_head = StandardRPNHead.from_config(
          config, [shape[f] for f in features]
      )
      num_cell_anchors = example_head["num_anchors"]
      box_dim = example_head["box_dim"]
      self.proposal_generator.rpn_head.objectness_logits = nn.Conv2d(
          hid_channels, num_cell_anchors, kernel_size=1, stride=1
      )
      self.proposal_generator.rpn_head.anchor_deltas = nn.Conv2d(
          hid_channels,
          num_cell_anchors * box_dim,
          kernel_size=1,
          stride=1,
      )
  
file_path: mmf/mmf/models/frcnn.py
imports: from typing import List
  import omegaconf
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 2 for calling the GeneralizedRCNN obj's underlying member method code with example usage: obj._fix_proposal_generator(config) without return types