code: def concat_box_prediction_layers(box_cls, box_regression):
      # type: (List[Tensor], List[Tensor]) -> Tuple[Tensor, Tensor]
      """
      对box_cla和box_regression两个list中的每个预测特征层的预测信息
      的tensor排列顺序以及shape进行调整 -> [N, -1, C]
      Args:
          box_cls: 每个预测特征层上的预测目标概率
          box_regression: 每个预测特征层上的预测目标bboxes regression参数
  
      Returns:
  
      """
      box_cls_flattened = []
      box_regression_flattened = []
  
      # 遍历每个预测特征层
      for box_cls_per_level, box_regression_per_level in zip(
          box_cls, box_regression
      ):
          # [batch_size, anchors_num_per_position * classes_num, height, width]
          # 注意，当计算RPN中的proposal时，classes_num=1,只区分目标和背景
          N, AxC, H, W = box_cls_per_level.shape
          # # [batch_size, anchors_num_per_position * 4, height, width]
          Ax4 = box_regression_per_level.shape[1]
          # anchors_num_per_position
          A = Ax4 // 4
          # classes_num
          C = AxC // A
  
          # [N, -1, C]
          box_cls_per_level = permute_and_flatten(
              box_cls_per_level, N, A, C, H, W
          )
          box_cls_flattened.append(box_cls_per_level)
  
          # [N, -1, C]
          box_regression_per_level = permute_and_flatten(
              box_regression_per_level, N, A, 4, H, W
          )
          box_regression_flattened.append(box_regression_per_level)
  
      box_cls = torch.cat(box_cls_flattened, dim=1).flatten(
          0, -2
      )  # start_dim, end_dim
      box_regression = torch.cat(
          box_regression_flattened, dim=1
      ).reshape(-1, 4)
      return box_cls, box_regression
  
imports: from typing import List, Optional, Dict, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  import torchvision
  from .None import det_utils
  from .None import boxes
  from .image_list import ImageList
label_desc: Use image node_id 3 for calling a global function with example usage: concat_box_prediction_layers(box_cls, box_regression) and returns: box_cls,  box_regression