class_docstr: FPG.
  
  Implementation of `Feature Pyramid Grids (FPG)
  <https://arxiv.org/abs/2004.03580>`_.
  This implementation only gives the basic structure stated in the paper.
  But users can implement different type of transitions to fully explore the
  the potential power of the structure of FPG.
  
  Args:
      in_channels (int): Number of input channels (feature maps of all levels
          should have the same channels).
      out_channels (int): Number of output channels (used at each scale)
      num_outs (int): Number of output scales.
      stack_times (int): The number of times the pyramid architecture will
          be stacked.
      paths (list[str]): Specify the path order of each stack level.
          Each element in the list should be either 'bu' (bottom-up) or
          'td' (top-down).
      inter_channels (int): Number of inter channels.
      same_up_trans (dict): Transition that goes down at the same stage.
      same_down_trans (dict): Transition that goes up at the same stage.
      across_lateral_trans (dict): Across-pathway same-stage
      across_down_trans (dict): Across-pathway bottom-up connection.
      across_up_trans (dict): Across-pathway top-down connection.
      across_skip_trans (dict): Across-pathway skip connection.
      output_trans (dict): Transition that trans the output of the
          last stage.
      start_level (int): Index of the start input backbone level used to
          build the feature pyramid. Default: 0.
      end_level (int): Index of the end input backbone level (exclusive) to
          build the feature pyramid. Default: -1, which means the last level.
      add_extra_convs (bool): It decides whether to add conv
          layers on top of the original feature maps. Default to False.
          If True, its actual mode is specified by `extra_convs_on_inputs`.
      norm_cfg (dict): Config dict for normalization layer. Default: None.
      init_cfg (dict or list[dict], optional): Initialization config dict.
code: def build_trans(self, cfg, in_channels, out_channels, **extra_args):
      cfg_ = cfg.copy()
      trans_type = cfg_.pop("type")
      trans_cls = self.transition_types[trans_type]
      return trans_cls(in_channels, out_channels, **cfg_, **extra_args)
  
imports: import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule
  from mmengine.model import BaseModule
  from mmdet.registry import MODELS
label_desc: Use image node_id 2 for calling the FPG obj's underlying member method code with example usage: obj.build_trans(cfg, in_channels, out_channels) and returns: trans_cls