Hey, I am learning Faster-rcnn by reading the source code,
i don’t know why here using Order Dict

  
      github.com
  
  
    pytorch/vision/blob/master/torchvision/models/detection/generalized_rcnn.py#L96

        degenerate_boxes = boxes[:, 2:] <= boxes[:, :2]
        if degenerate_boxes.any():
            # print the first degenrate box
            bb_idx = degenerate_boxes.any(dim=1).nonzero().view(-1)[0]
            degen_bb: List[float] = boxes[bb_idx].tolist()
            raise ValueError("All bounding boxes should have positive height and width."
                             " Found invaid box {} for target at index {}."
                             .format(degen_bb, target_idx))

features = self.backbone(images.tensors)
if isinstance(features, torch.Tensor):
    features = OrderedDict([('0', features)])
proposals, proposal_losses = self.rpn(images, features, targets)
detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)
detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes)

losses = {}
losses.update(detector_losses)
losses.update(proposal_losses)

if torch.jit.is_scripting():



  
  
    
    
  
  


This is passed as a parameter to the self.rpn function on the next line.
and In rpn turn the Order dict  into an array

  
      github.com
  
  
    pytorch/vision/blob/master/torchvision/models/detection/rpn.py#L479

        If provided, each element in the dict should contain a field `boxes`,
        with the locations of the ground-truth boxes.

Returns:
    boxes (List[Tensor]): the predicted boxes from the RPN, one Tensor per
        image.
    losses (Dict[Tensor]): the losses for the model during training. During
        testing, it is an empty dict.
"""
# RPN uses all feature maps that are available
features = list(features.values())
objectness, pred_bbox_deltas = self.head(features)
anchors = self.anchor_generator(images, features)

num_images = len(anchors)
num_anchors_per_level_shape_tensors = [o[0].shape for o in objectness]
num_anchors_per_level = [s[0] * s[1] * s[2] for s in num_anchors_per_level_shape_tensors]
objectness, pred_bbox_deltas = \
    concat_box_prediction_layers(objectness, pred_bbox_deltas)
# apply pred_bbox_deltas to anchors to obtain the decoded proposals
# note that we detach the deltas because Faster R-CNN do not backprop through



  
  
    
    
  
  


I think here is a reason, can someone help me ?