class_docstr: Simple Feature Pyramid Network for ViTDet.
docstr: Forward function.
  
  Args:
      inputs (Tensor): Features from the upstream network, 4D-tensor
  Returns:
      tuple: Feature maps, each is a 4D-tensor.
code: def forward(self, input: Tensor) -> tuple:
      """Forward function.
  
      Args:
          inputs (Tensor): Features from the upstream network, 4D-tensor
      Returns:
          tuple: Feature maps, each is a 4D-tensor.
      """
      # build FPN
      inputs = []
      inputs.append(self.fpn1(input))
      inputs.append(self.fpn2(input))
      inputs.append(self.fpn3(input))
      inputs.append(self.fpn4(input))
  
      # build laterals
      laterals = [
          lateral_conv(inputs[i])
          for i, lateral_conv in enumerate(self.lateral_convs)
      ]
  
      # build outputs
      # part 1: from original levels
      outs = [
          self.fpn_convs[i](laterals[i]) for i in range(self.num_ins)
      ]
  
      # part 2: add extra levels
      if self.num_outs > len(outs):
          for i in range(self.num_outs - self.num_ins):
              outs.append(F.max_pool2d(outs[-1], 1, stride=2))
      return tuple(outs)
  
file_path: mmdetection/projects/ViTDet/vitdet/simple_fpn.py
imports: from typing import List
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, build_norm_layer
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import MultiConfig, OptConfigType
label_desc: Use image node_id 2 for calling the SimpleFPN obj's underlying member method code with example usage: obj.forward(input) and returns: tuple