class_docstr: Feature Pyramid Network, see https://arxiv.org/abs/1612.03144
  
  Args:
      in_channels (list[int]): input channels of each level which can be 
          derived from the output shape of backbone by from_config
      out_channel (int): output channel of each level
      spatial_scales (list[float]): the spatial scales between input feature
          maps and original input image which can be derived from the output 
          shape of backbone by from_config
      has_extra_convs (bool): whether to add extra conv to the last level.
          default False
      extra_stage (int): the number of extra stages added to the last level.
          default 1
      use_c5 (bool): Whether to use c5 as the input of extra stage, 
          otherwise p5 is used. default True
      norm_type (string|None): The normalization type in FPN module. If 
          norm_type is None, norm will not be used after conv and if 
          norm_type is string, bn, gn, sync_bn are available. default None
      norm_decay (float): weight decay for normalization layer weights.
          default 0.
      freeze_norm (bool): whether to freeze normalization layer.  
          default False
      relu_before_extra_convs (bool): whether to add relu before extra convs.
          default False
      
class_docstr_tok: ["Feature","Pyramid","Network",",","see","https",":","\/\/arxiv.org\/abs\/1612.03144","Args",":","in_channels","(","list","[","int","]",")",":","input","channels","of","each","level","which","can","be","derived","from","the","output","shape","of","backbone","by","from_config","out_channel","(","int",")",":","output","channel","of","each","level","spatial_scales","(","list","[","float","]",")",":","the","spatial","scales","between","input","feature","maps","and","original","input","image","which","can","be","derived","from","the","output","shape","of","backbone","by","from_config","has_extra_convs","(","bool",")",":","whether","to","add","extra","conv","to","the","last","level",".","default","False","extra_stage","(","int",")",":","the","number","of","extra","stages","added","to","the","last","level",".","default","1","use_c5","(","bool",")",":","Whether","to","use","c5","as","the","input","of","extra","stage",",","otherwise","p5","is","used",".","default","True","norm_type","(","string|None",")",":","The","normalization","type","in","FPN","module",".","If","norm_type","is","None",",","norm","will","not","be","used","after","conv","and","if","norm_type","is","string",",","bn",",","gn",",","sync_bn","are","available",".","default","None","norm_decay","(","float",")",":","weight","decay","for","normalization","layer","weights",".","default","0.","freeze_norm","(","bool",")",":","whether","to","freeze","normalization","layer",".","default","False","relu_before_extra_convs","(","bool",")",":","whether","to","add","relu","before","extra","convs",".","default","False"]
code: def from_config(cls, cfg, input_shape):
      return {
          "in_channels": [i.channels for i in input_shape],
          "spatial_scales": [1.0 / i.stride for i in input_shape],
      }
  
file_path: PaddleDetection/ppdet/modeling/necks/fpn.py
imports: import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.nn.initializer import XavierUniform
  from ppdet.core.workspace import register, serializable
  from ppdet.modeling.layers import ConvNormLayer
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 2 for calling the FPN obj's underlying member method code with example usage: obj.from_config(cls, cfg, input_shape) and returns: dict