class_docstr: Module that adds a FPN from on top of a set of feature maps. This is based on
  `"Feature Pyramid Network for Object Detection" <https://arxiv.org/abs/1612.03144>`_.
  The feature maps are currently supposed to be in increasing depth
  order.
  The input to the model is expected to be an OrderedDict[Tensor], containing
  the feature maps on top of which the FPN will be added.
  Arguments:
      in_channels_list (list[int]): number of channels for each feature map that
          is passed to the module
      out_channels (int): number of channels of the FPN representation
      extra_blocks (ExtraFPNBlock or None): if provided, extra operations will
          be performed. It is expected to take the fpn features, the original
          features and the names of the original features as input, and returns
          a new list of feature maps and their corresponding names
class_docstr_tok: ["Module","that","adds","a","FPN","from","on","top","of","a","set","of","feature","maps",".","This","is","based","on","`","``","Feature","Pyramid","Network","for","Object","Detection","''","<","https",":","\/\/arxiv.org\/abs\/1612.03144",">","`","_",".","The","feature","maps","are","currently","supposed","to","be","in","increasing","depth","order",".","The","input","to","the","model","is","expected","to","be","an","OrderedDict","[","Tensor","]",",","containing","the","feature","maps","on","top","of","which","the","FPN","will","be","added",".","Arguments",":","in_channels_list","(","list","[","int","]",")",":","number","of","channels","for","each","feature","map","that","is","passed","to","the","module","out_channels","(","int",")",":","number","of","channels","of","the","FPN","representation","extra_blocks","(","ExtraFPNBlock","or","None",")",":","if","provided",",","extra","operations","will","be","performed",".","It","is","expected","to","take","the","fpn","features",",","the","original","features","and","the","names","of","the","original","features","as","input",",","and","returns","a","new","list","of","feature","maps","and","their","corresponding","names"]
docstr: Computes the FPN for a set of feature maps.
  Arguments:
      x (OrderedDict[Tensor]): feature maps for each feature level.
  Returns:
      results (OrderedDict[Tensor]): feature maps after FPN layers.
          They are ordered from highest resolution first.
docstr_tok: ["Computes","the","FPN","for","a","set","of","feature","maps",".","Arguments",":","x","(","OrderedDict","[","Tensor","]",")",":","feature","maps","for","each","feature","level",".","Returns",":","results","(","OrderedDict","[","Tensor","]",")",":","feature","maps","after","FPN","layers",".","They","are","ordered","from","highest","resolution","first","."]
code: def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]:
      """
      Computes the FPN for a set of feature maps.
      Arguments:
          x (OrderedDict[Tensor]): feature maps for each feature level.
      Returns:
          results (OrderedDict[Tensor]): feature maps after FPN layers.
              They are ordered from highest resolution first.
      """
      # unpack OrderedDict into two lists for easier handling
      names = list(x.keys())
      x = list(x.values())
  
      # 将resnet layer4的channel调整到指定的out_channels
      # last_inner = self.inner_blocks[-1](x[-1])
      last_inner = self.get_result_from_inner_blocks(x[-1], -1)
      # result中保存着每个预测特征层
      results = []
      # 将layer4调整channel后的特征矩阵，通过3x3卷积后得到对应的预测特征矩阵
      # results.append(self.layer_blocks[-1](last_inner))
      results.append(self.get_result_from_layer_blocks(last_inner, -1))
  
      for idx in range(len(x) - 2, -1, -1):
          inner_lateral = self.get_result_from_inner_blocks(x[idx], idx)
          feat_shape = inner_lateral.shape[-2:]
          inner_top_down = F.interpolate(
              last_inner, size=feat_shape, mode="nearest"
          )
          last_inner = inner_lateral + inner_top_down
          results.insert(
              0, self.get_result_from_layer_blocks(last_inner, idx)
          )
  
      # 在layer4对应的预测特征层基础上生成预测特征矩阵5
      if self.extra_blocks is not None:
          results, names = self.extra_blocks(results, x, names)
  
      # make it back an OrderedDict
      out = OrderedDict([(k, v) for k, v in zip(names, results)])
  
      return out
  
imports: from collections import OrderedDict
  import torch.nn
  import torch
  from torch import Tensor
  import torch.nn.functional
  from torch.jit.annotations import Tuple, List, Dict
label_desc: Use image node_id 4 for calling the FeaturePyramidNetwork obj's underlying member method code with example usage: obj.forward(x) and returns: out