class_docstr: Two linear layers for predicting Fast R-CNN outputs:
  
  1. proposal-to-detection box regression deltas
  2. classification scores
class_docstr_tok: ["Two","linear","layers","for","predicting","Fast","R-CNN","outputs",":","1.","proposal-to-detection","box","regression","deltas","2.","classification","scores"]
docstr: Args:
      predictions: return values of :meth:`forward()`.
      proposals (list[Instances]): proposals that match the features that were
          used to compute predictions. The ``proposal_boxes`` field is expected.
  
  Returns:
      list[Instances]: same as `fast_rcnn_inference`.
      list[Tensor]: same as `fast_rcnn_inference`.
docstr_tok: ["Args",":","predictions",":","return","values","of",":","meth",":","`","forward","(",")","`",".","proposals","(","list","[","Instances","]",")",":","proposals","that","match","the","features","that","were","used","to","compute","predictions",".","The","``","proposal_boxes","``","field","is","expected",".","Returns",":","list","[","Instances","]",":","same","as","`","fast_rcnn_inference","`",".","list","[","Tensor","]",":","same","as","`","fast_rcnn_inference","`","."]
code: def inference(
      self,
      predictions: Tuple[torch.Tensor, torch.Tensor],
      proposals: List[Instances],
  ):
      """
      Args:
          predictions: return values of :meth:`forward()`.
          proposals (list[Instances]): proposals that match the features that were
              used to compute predictions. The ``proposal_boxes`` field is expected.
  
      Returns:
          list[Instances]: same as `fast_rcnn_inference`.
          list[Tensor]: same as `fast_rcnn_inference`.
      """
      boxes = self.predict_boxes(predictions, proposals)
      scores = self.predict_probs(predictions, proposals)
      image_shapes = [x.image_size for x in proposals]
      return fast_rcnn_inference(
          boxes,
          scores,
          image_shapes,
          self.test_score_thresh,
          self.test_nms_thresh,
          self.test_topk_per_image,
      )
  
imports: import logging
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.data.detection_utils import get_fed_loss_cls_weights
  from detectron2.layers import ShapeSpec, batched_nms, cat, cross_entropy, nonzero_tuple
  from detectron2.modeling.box_regression import Box2BoxTransform, _dense_box_regression_loss
  from detectron2.structures import Boxes, Instances
  from detectron2.utils.events import get_event_storage
label_desc: Use image node_id 8 for calling the FastRCNNOutputLayers obj's underlying member method code with example usage: obj.inference(predictions, proposals) and returns: fast_rcnn_inference