class_docstr: Pixel decoder with a structure like fpn.
  
  Args:
      in_channels (list[int] | tuple[int]): Number of channels in the
          input feature maps.
      feat_channels (int): Number channels for feature.
      out_channels (int): Number channels for output.
      norm_cfg (:obj:`ConfigDict` or dict): Config for normalization.
          Defaults to dict(type='GN', num_groups=32).
      act_cfg (:obj:`ConfigDict` or dict): Config for activation.
          Defaults to dict(type='ReLU').
      encoder (:obj:`ConfigDict` or dict): Config for transorformer
          encoder.Defaults to None.
      positional_encoding (:obj:`ConfigDict` or dict): Config for
          transformer encoder position encoding. Defaults to
          dict(type='SinePositionalEncoding', num_feats=128,
          normalize=True).
      init_cfg (:obj:`ConfigDict` or dict or list[:obj:`ConfigDict` or             dict], optional): Initialization config dict. Defaults to None.
class_docstr_tok: ["Pixel","decoder","with","a","structure","like","fpn",".","Args",":","in_channels","(","list","[","int","]","|","tuple","[","int","]",")",":","Number","of","channels","in","the","input","feature","maps",".","feat_channels","(","int",")",":","Number","channels","for","feature",".","out_channels","(","int",")",":","Number","channels","for","output",".","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","for","normalization",".","Defaults","to","dict","(","type='GN","'",",","num_groups=32",")",".","act_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","for","activation",".","Defaults","to","dict","(","type='ReLU","'",")",".","encoder","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","for","transorformer","encoder.Defaults","to","None",".","positional_encoding","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","for","transformer","encoder","position","encoding",".","Defaults","to","dict","(","type='SinePositionalEncoding","'",",","num_feats=128",",","normalize=True",")",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict","or","list","[",":","obj",":","`","ConfigDict","`","or","dict","]",",","optional",")",":","Initialization","config","dict",".","Defaults","to","None","."]
docstr: Args:
      feats (list[Tensor]): Feature maps of each level. Each has
          shape of (batch_size, c, h, w).
      batch_img_metas (list[dict]): List of image information.
          Pass in for creating more accurate padding mask. Not
          used here.
  
  Returns:
      tuple[Tensor, Tensor]: a tuple containing the following:
  
          - mask_feature (Tensor): Shape (batch_size, c, h, w).
          - memory (Tensor): Output of last stage of backbone.                        Shape (batch_size, c, h, w).
docstr_tok: ["Args",":","feats","(","list","[","Tensor","]",")",":","Feature","maps","of","each","level",".","Each","has","shape","of","(","batch_size",",","c",",","h",",","w",")",".","batch_img_metas","(","list","[","dict","]",")",":","List","of","image","information",".","Pass","in","for","creating","more","accurate","padding","mask",".","Not","used","here",".","Returns",":","tuple","[","Tensor",",","Tensor","]",":","a","tuple","containing","the","following",":","-","mask_feature","(","Tensor",")",":","Shape","(","batch_size",",","c",",","h",",","w",")",".","-","memory","(","Tensor",")",":","Output","of","last","stage","of","backbone",".","Shape","(","batch_size",",","c",",","h",",","w",")","."]
code: def forward(
      self, feats: List[Tensor], batch_img_metas: List[dict]
  ) -> Tuple[Tensor, Tensor]:
      """
          Args:
              feats (list[Tensor]): Feature maps of each level. Each has
                  shape of (batch_size, c, h, w).
              batch_img_metas (list[dict]): List of image information.
                  Pass in for creating more accurate padding mask. Not
                  used here.
  
          Returns:
              tuple[Tensor, Tensor]: a tuple containing the following:
  
                  - mask_feature (Tensor): Shape (batch_size, c, h, w).
                  - memory (Tensor): Output of last stage of backbone.\
                          Shape (batch_size, c, h, w).
          """
      y = self.last_feat_conv(feats[-1])
      for i in range(self.num_inputs - 2, -1, -1):
          x = feats[i]
          cur_feat = self.lateral_convs[i](x)
          y = cur_feat + F.interpolate(
              y, size=cur_feat.shape[-2:], mode="nearest"
          )
          y = self.output_convs[i](y)
  
      mask_feature = self.mask_feature(y)
      memory = feats[-1]
      return mask_feature, memory
  
imports: from typing import List, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Conv2d, ConvModule
  from mmengine.model import BaseModule, ModuleList, caffe2_xavier_init
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, OptMultiConfig
  from .positional_encoding import SinePositionalEncoding
  from .transformer import DetrTransformerEncoder
label_desc: Use image node_id 3 for calling the PixelDecoder obj's underlying member method code with example usage: obj.forward(feats, batch_img_metas) and returns: mask_feature,  memory