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","."]
code: def __init__(
      self,
      in_channels: Union[List[int], Tuple[int]],
      feat_channels: int,
      out_channels: int,
      norm_cfg: ConfigType = dict(type="GN", num_groups=32),
      act_cfg: ConfigType = dict(type="ReLU"),
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(init_cfg=init_cfg)
      self.in_channels = in_channels
      self.num_inputs = len(in_channels)
      self.lateral_convs = ModuleList()
      self.output_convs = ModuleList()
      self.use_bias = norm_cfg is None
      for i in range(0, self.num_inputs - 1):
          lateral_conv = ConvModule(
              in_channels[i],
              feat_channels,
              kernel_size=1,
              bias=self.use_bias,
              norm_cfg=norm_cfg,
              act_cfg=None,
          )
          output_conv = ConvModule(
              feat_channels,
              feat_channels,
              kernel_size=3,
              stride=1,
              padding=1,
              bias=self.use_bias,
              norm_cfg=norm_cfg,
              act_cfg=act_cfg,
          )
          self.lateral_convs.append(lateral_conv)
          self.output_convs.append(output_conv)
  
      self.last_feat_conv = ConvModule(
          in_channels[-1],
          feat_channels,
          kernel_size=3,
          padding=1,
          stride=1,
          bias=self.use_bias,
          norm_cfg=norm_cfg,
          act_cfg=act_cfg,
      )
      self.mask_feature = Conv2d(
          feat_channels,
          out_channels,
          kernel_size=3,
          stride=1,
          padding=1,
      )
  
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 1 to create a new PixelDecoder object from inherited base classes: BaseModule with example: obj = PixelDecoder(in_channels, feat_channels, out_channels, norm_cfg, act_cfg, init_cfg)