def _make_stem_layer(self, in_channels: int, channels: int,
                         num_blocks: int) -> nn.Sequential:
        """Make stem layer.

        Args:
            in_channels (int): Number of input channels.
            channels (int): Number of output channels.
            num_blocks (int): Number of blocks.

        Returns:
            nn.Sequential: The stem layer.
        """

        layers = [
            ConvBNAct(in_channels,
                      channels,
                      kernel_size=3,
                      stride=2,
                      padding=1,
                      act_type='relu',
                      bias_attr=False),
            ConvBNAct(channels,
                      channels,
                      kernel_size=3,
                      stride=2,
                      padding=1,
                      act_type='relu',
                      bias_attr=False),
        ]

        layers.append(
            self._make_layer(BasicBlock, channels, channels, num_blocks))
        layers.append(nn.ReLU())
        layers.append(
            self._make_layer(BasicBlock,
                             channels,
                             channels * 2,
                             num_blocks,
                             stride=2))
        layers.append(nn.ReLU())

        return nn.Sequential(*layers)
Make stem layer.

        Args:
            in_channels (int): Number of input channels.
            channels (int): Number of output channels.
            num_blocks (int): Number of blocks.

        Returns:
            nn.Sequential: The stem layer.
        
paddleseg/models/backbones/pidnet.py