class_docstr: UNet backbone.
  U-Net: Convolutional Networks for Biomedical Image Segmentation.
  https://arxiv.org/pdf/1505.04597.pdf
  
  Args:
      in_channels (int): Number of input image channels. Default" 3.
      base_channels (int): Number of base channels of each stage.
          The output channels of the first stage. Default: 64.
      num_stages (int): Number of stages in encoder, normally 5. Default: 5.
      strides (Sequence[int 1 | 2]): Strides of each stage in encoder.
          len(strides) is equal to num_stages. Normally the stride of the
          first stage in encoder is 1. If strides[i]=2, it uses stride
          convolution to downsample in the correspondence encoder stage.
          Default: (1, 1, 1, 1, 1).
      enc_num_convs (Sequence[int]): Number of convolutional layers in the
          convolution block of the correspondence encoder stage.
          Default: (2, 2, 2, 2, 2).
      dec_num_convs (Sequence[int]): Number of convolutional layers in the
          convolution block of the correspondence decoder stage.
          Default: (2, 2, 2, 2).
      downsamples (Sequence[int]): Whether use MaxPool to downsample the
          feature map after the first stage of encoder
          (stages: [1, num_stages)). If the correspondence encoder stage use
          stride convolution (strides[i]=2), it will never use MaxPool to
          downsample, even downsamples[i-1]=True.
          Default: (True, True, True, True).
      enc_dilations (Sequence[int]): Dilation rate of each stage in encoder.
          Default: (1, 1, 1, 1, 1).
      dec_dilations (Sequence[int]): Dilation rate of each stage in decoder.
          Default: (1, 1, 1, 1).
      with_cp (bool): Use checkpoint or not. Using checkpoint will save some
          memory while slowing down the training speed. Default: False.
      conv_cfg (dict | None): Config dict for convolution layer.
          Default: None.
      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').
      upsample_cfg (dict): The upsample config of the upsample module in
          decoder. Default: dict(type='InterpConv').
      norm_eval (bool): Whether to set norm layers to eval mode, namely,
          freeze running stats (mean and var). Note: Effect on Batch Norm
          and its variants only. Default: False.
      dcn (bool): Use deformable convolution in convolutional layer or not.
          Default: None.
      plugins (dict): plugins for convolutional layers. Default: None.
  
  Notice:
      The input image size should be divisible by the whole downsample rate
      of the encoder. More detail of the whole downsample rate can be found
      in UNet._check_input_divisible.
code: def _check_input_divisible(self, x):
      h, w = x.shape[-2:]
      whole_downsample_rate = 1
      for i in range(1, self.num_stages):
          if self.strides[i] == 2 or self.downsamples[i - 1]:
              whole_downsample_rate *= 2
      assert (
          h % whole_downsample_rate == 0
          and w % whole_downsample_rate == 0
      ), (
          f"The input image size {(h, w)} should be divisible by the whole "
          f"downsample rate {whole_downsample_rate}, when num_stages is "
          f"{self.num_stages}, strides is {self.strides}, and downsamples "
          f"is {self.downsamples}."
      )
  
imports: import torch
  import torch.nn
  import torch.utils.checkpoint
  from mmcv.cnn import ConvModule, build_norm_layer
  from mmengine.model import BaseModule
  from mmengine.utils.dl_utils.parrots_wrapper import _BatchNorm
  from mmocr.registry import MODELS
label_desc: Use image node_id 4 for calling the UNet obj's underlying member method code with example usage: obj._check_input_divisible(x) without return types