code: def __init__(self, cfg, torch_model, enable_tensor_mode=True):
      assert isinstance(torch_model, meta_arch.GeneralizedRCNN)
      torch_model = patch_generalized_rcnn(torch_model)
      super().__init__(cfg, torch_model, enable_tensor_mode)
  
      try:
          use_heatmap_max_keypoint = (
              cfg.EXPORT_CAFFE2.USE_HEATMAP_MAX_KEYPOINT
          )
      except AttributeError:
          use_heatmap_max_keypoint = False
      self.roi_heads_patcher = ROIHeadsPatcher(
          self._wrapped_model.roi_heads, use_heatmap_max_keypoint
      )
      if self.tensor_mode:
          self.roi_heads_patcher.patch_roi_heads()
  
imports: import functools
  import io
  import struct
  import types
  import torch
  from detectron2.modeling import meta_arch
  from detectron2.modeling.box_regression import Box2BoxTransform
  from detectron2.modeling.roi_heads import keypoint_head
  from detectron2.structures import Boxes, ImageList, Instances, RotatedBoxes
  from .c10 import Caffe2Compatible
  from .caffe2_patch import ROIHeadsPatcher, patch_generalized_rcnn
  from .shared import alias, check_set_pb_arg, get_pb_arg_floats, get_pb_arg_valf, get_pb_arg_vali, get_pb_arg_vals, mock_torch_nn_functional_interpolate
label_desc: Use image node_id 1 to create a new Caffe2GeneralizedRCNN object from inherited base classes: Caffe2MetaArch with example: obj = Caffe2GeneralizedRCNN(cfg, torch_model, enable_tensor_mode)