class_docstr: The DDRNet implementation based on PaddlePaddle.
  
  The original article refers to
  Yuanduo Hong, Huihui Pan, Weichao Sun, et al. "Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes"
  (https://arxiv.org/abs/2101.06085)
  
  Args:
      num_classes (int): The unique number of target classes.
      in_channels (int, optional): Number of input channels. Default: 3.
      block_layers (list, tuple): The numbers of layers in different blocks. Default: [2, 2, 2, 2].
      planes (int): Base channels in network. Default: 64.
      spp_planes (int): Branch channels for DAPPM. Default: 128.
      head_planes (int): Mid channels of segmentation head. Default: 128.
      enable_auxiliary_loss (bool): Whether use auxiliary head for stage3. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
code: def __init__(
      self,
      num_classes,
      in_channels=3,
      block_layers=[2, 2, 2, 2],
      planes=64,
      spp_planes=128,
      head_planes=128,
      enable_auxiliary_loss=False,
      pretrained=None,
  ):
      super().__init__()
      highres_planes = planes * 2
      self.enable_auxiliary_loss = enable_auxiliary_loss
      self.conv1 = nn.Sequential(
          layers.ConvBNReLU(
              in_channels, planes, kernel_size=3, stride=2, padding=1
          ),
          layers.ConvBNReLU(
              planes, planes, kernel_size=3, stride=2, padding=1
          ),
      )
      self.relu = nn.ReLU()
      self.layer1 = self._make_layers(
          BasicBlock, planes, planes, block_layers[0]
      )
      self.layer2 = self._make_layers(
          BasicBlock, planes, planes * 2, block_layers[1], stride=2
      )
      self.layer3 = self._make_layers(
          BasicBlock, planes * 2, planes * 4, block_layers[2], stride=2
      )
      self.layer4 = self._make_layers(
          BasicBlock, planes * 4, planes * 8, block_layers[3], stride=2
      )
  
      self.compression3 = layers.ConvBN(
          planes * 4, highres_planes, kernel_size=1, bias_attr=False
      )
  
      self.compression4 = layers.ConvBN(
          planes * 8, highres_planes, kernel_size=1, bias_attr=False
      )
  
      self.down3 = layers.ConvBN(
          highres_planes,
          planes * 4,
          kernel_size=3,
          stride=2,
          bias_attr=False,
      )
  
      self.down4 = nn.Sequential(
          layers.ConvBNReLU(
              highres_planes,
              planes * 4,
              kernel_size=3,
              stride=2,
              padding=1,
              bias_attr=False,
          ),
          layers.ConvBN(
              planes * 4,
              planes * 8,
              kernel_size=3,
              stride=2,
              padding=1,
              bias_attr=False,
          ),
      )
  
      self.layer3_ = self._make_layers(
          BasicBlock, planes * 2, highres_planes, 2
      )
      self.layer4_ = self._make_layers(
          BasicBlock, highres_planes, highres_planes, 2
      )
      self.layer5_ = self._make_layers(
          Bottleneck, highres_planes, highres_planes, 1
      )
      self.layer5 = self._make_layers(
          Bottleneck, planes * 8, planes * 8, 1, stride=2
      )
  
      self.spp = DAPPM(planes * 16, spp_planes, planes * 4)
      if self.enable_auxiliary_loss:
          self.aux_head = DDRNetHead(
              highres_planes, head_planes, num_classes
          )
      self.head = DDRNetHead(planes * 4, head_planes, num_classes)
  
      self.pretrained = pretrained
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new DualResNet object from inherited base classes: nn with example: obj = DualResNet(num_classes, in_channels, block_layers, planes, spp_planes, head_planes, enable_auxiliary_loss, pretrained)