class_docstr: A self-developed ultra lightweight model from PaddleSeg, is suitable for real-time scene segmentation on web or mobile terminals.
class_docstr_tok: ["A","self-developed","ultra","lightweight","model","from","PaddleSeg",",","is","suitable","for","real-time","scene","segmentation","on","web","or","mobile","terminals","."]
code: def __init__(
      self,
      num_classes,
      in_channels=3,
      pretrained=None,
      align_corners=False,
  ):
      super().__init__()
      self.pretrained = pretrained
      self.num_classes = num_classes
      self.align_corners = align_corners
  
      self.conv_bn0 = _ConvBNReLU(in_channels, 36, 3, 2, 1)
      self.conv_bn1 = _ConvBNReLU(36, 18, 1, 1, 0)
  
      self.block1 = nn.Sequential(
          InvertedResidual(36, stride=2, out_channels=72),
          InvertedResidual(72, stride=1),
          InvertedResidual(72, stride=1),
          InvertedResidual(72, stride=1),
      )
  
      self.block2 = nn.Sequential(
          InvertedResidual(72, stride=2),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
          InvertedResidual(144, stride=1),
      )
  
      self.depthwise_separable0 = _SeparableConvBNReLU(
          144, 64, 3, stride=1
      )
      self.depthwise_separable1 = _SeparableConvBNReLU(
          82, 64, 3, stride=1
      )
      self.depthwise_separable2 = _SeparableConvBNReLU(
          64, self.num_classes, 3, stride=1
      )
  
      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 PPHumanSegLite object from inherited base classes: nn with example: obj = PPHumanSegLite(num_classes, in_channels, pretrained, align_corners)