def _make_single_layer(self,
                           block: Union[BasicBlock, Bottleneck],
                           in_channels: int,
                           channels: int,
                           stride: int = 1) -> nn.Layer:
        """Make single layer for PIDNet backbone.
        Args:
            block (BasicBlock or Bottleneck): Basic block or Bottleneck.
            in_channels (int): Number of input channels.
            channels (int): Number of output channels.
            stride (int): Stride of the first block. Default: 1.

        Returns:
            nn.Layer
        """

        downsample = None
        if stride != 1 or in_channels != channels * block.expansion:
            downsample = ConvBNAct(in_channels,
                                   channels * block.expansion,
                                   kernel_size=1,
                                   stride=stride,
                                   bias_attr=False)
        return block(in_channels, channels, stride, downsample, no_relu=True)
Make single layer for PIDNet backbone.
        Args:
            block (BasicBlock or Bottleneck): Basic block or Bottleneck.
            in_channels (int): Number of input channels.
            channels (int): Number of output channels.
            stride (int): Stride of the first block. Default: 1.

        Returns:
            nn.Layer
        
paddleseg/models/backbones/pidnet.py