class_docstr: Main class for Generalized R-CNN.
  
  Args:
      backbone (nn.Module):
      rpn (nn.Module):
      roi_heads (nn.Module): takes the features + the proposals from the RPN and computes
          detections / masks from it.
      transform (nn.Module): performs the data transformation from the inputs to feed into
          the model
code: def __init__(
      self,
      backbone: nn.Module,
      rpn: nn.Module,
      roi_heads: nn.Module,
      transform: nn.Module,
  ) -> None:
      super().__init__()
      _log_api_usage_once(self)
      self.transform = transform
      self.backbone = backbone
      self.rpn = rpn
      self.roi_heads = roi_heads
      # used only on torchscript mode
      self._has_warned = False
  
file_path: vision/torchvision/models/detection/generalized_rcnn.py
imports: import warnings
  from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from torch import nn, Tensor
  from ...utils import _log_api_usage_once
label_desc: Use image node_id 1 to create a new GeneralizedRCNN object from inherited base classes: nn with example: obj = GeneralizedRCNN(backbone, rpn, roi_heads, transform)