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[Tensor]:
          A list of Tensors of predicted class-specific or class-agnostic boxes
          for each image. Element i has shape (Ri, K * B) or (Ri, B), where Ri is
          the number of proposals for image i and B is the box dimension (4 or 5)
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","[","Tensor","]",":","A","list","of","Tensors","of","predicted","class-specific","or","class-agnostic","boxes","for","each","image",".","Element","i","has","shape","(","Ri",",","K","*","B",")","or","(","Ri",",","B",")",",","where","Ri","is","the","number","of","proposals","for","image","i","and","B","is","the","box","dimension","(","4","or","5",")"]
code: def predict_boxes(
      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[Tensor]:
              A list of Tensors of predicted class-specific or class-agnostic boxes
              for each image. Element i has shape (Ri, K * B) or (Ri, B), where Ri is
              the number of proposals for image i and B is the box dimension (4 or 5)
      """
      if not len(proposals):
          return []
      _, proposal_deltas = predictions
      num_prop_per_image = [len(p) for p in proposals]
      proposal_boxes = cat(
          [p.proposal_boxes.tensor for p in proposals], dim=0
      )
      predict_boxes = self.box2box_transform.apply_deltas(
          proposal_deltas,
          proposal_boxes,
      )  # Nx(KxB)
      return predict_boxes.split(num_prop_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 10 for calling the FastRCNNOutputLayers obj's underlying member method code with example usage: obj.predict_boxes(predictions, proposals) and returns: predict_boxes, list