class_docstr: Deconvolution upsample module in decoder for UNet (2X upsample).
  
  This module uses deconvolution to upsample feature map in the decoder
  of UNet.
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      with_cp (bool): Use checkpoint or not. Using checkpoint will save some
          memory while slowing down the training speed. Default: False.
      norm_cfg (dict | None): Config dict for normalization layer.
          Default: dict(type='BN').
      act_cfg (dict | None): Config dict for activation layer in ConvModule.
          Default: dict(type='ReLU').
      kernel_size (int): Kernel size of the convolutional layer. Default: 4.
class_docstr_tok: ["Deconvolution","upsample","module","in","decoder","for","UNet","(","2X","upsample",")",".","This","module","uses","deconvolution","to","upsample","feature","map","in","the","decoder","of","UNet",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","with_cp","(","bool",")",":","Use","checkpoint","or","not",".","Using","checkpoint","will","save","some","memory","while","slowing","down","the","training","speed",".","Default",":","False",".","norm_cfg","(","dict","|","None",")",":","Config","dict","for","normalization","layer",".","Default",":","dict","(","type='BN","'",")",".","act_cfg","(","dict","|","None",")",":","Config","dict","for","activation","layer","in","ConvModule",".","Default",":","dict","(","type='ReLU","'",")",".","kernel_size","(","int",")",":","Kernel","size","of","the","convolutional","layer",".","Default",":","4","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      with_cp=False,
      norm_cfg=dict(type="BN"),
      act_cfg=dict(type="ReLU"),
      *,
      kernel_size=4,
      scale_factor=2,
  ):
      super(DeconvModule, self).__init__()
  
      assert (kernel_size - scale_factor >= 0) and (
          kernel_size - scale_factor
      ) % 2 == 0, (
          f"kernel_size should be greater than or equal to scale_factor "
          f"and (kernel_size - scale_factor) should be even numbers, "
          f"while the kernel size is {kernel_size} and scale_factor is "
          f"{scale_factor}."
      )
  
      stride = scale_factor
      padding = (kernel_size - scale_factor) // 2
      self.with_cp = with_cp
      deconv = nn.ConvTranspose2d(
          in_channels,
          out_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
      )
  
      norm_name, norm = build_norm_layer(norm_cfg, out_channels)
      activate = build_activation_layer(act_cfg)
      self.deconv_upsamping = nn.Sequential(deconv, norm, activate)
  
imports: import torch.nn
  import torch.utils.checkpoint
  from annotator.uniformer.mmcv.cnn import UPSAMPLE_LAYERS, ConvModule, build_activation_layer, build_norm_layer, constant_init, kaiming_init
  from annotator.uniformer.mmcv.runner import load_checkpoint
  from annotator.uniformer.mmcv.utils.parrots_wrapper import _BatchNorm
  from annotator.uniformer.mmseg.utils import get_root_logger
  from ..builder import BACKBONES
  from ..utils import UpConvBlock
label_desc: Use image node_id 1 to create a new DeconvModule object from inherited base classes: nn with example: obj = DeconvModule(in_channels, out_channels, with_cp, norm_cfg, act_cfg)