class_docstr: Main class for Generalized R-CNN.
  
  Arguments:
      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
class_docstr_tok: ["Main","class","for","Generalized","R-CNN",".","Arguments",":","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 eager_outputs(self, losses, detections):
      # type: (Dict[str, Tensor], List[Dict[str, Tensor]]) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]]
      if self.training:
          return losses
  
      return detections
  
imports: import warnings
  from collections import OrderedDict
  from typing import Tuple, List, Dict, Optional, Union
  import torch
  from torch import nn, Tensor
  import torch.nn.functional
  from torchvision.ops import MultiScaleRoIAlign
  from .roi_head import RoIHeads
  from .transform import GeneralizedRCNNTransform
  from .rpn_function import AnchorsGenerator, RPNHead, RegionProposalNetwork
label_desc: Use image node_id 2 for calling the FasterRCNNBase obj's underlying member method code with example usage: obj.eager_outputs(losses, detections) and returns: detections, losses