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 forward(self, x):
      # Encoder
      input_shape = paddle.shape(x)[2:]
  
      x = self.conv_bn0(x)  # 1/2
      shortcut = self.conv_bn1(x)  # shortcut
      x = F.max_pool2d(x, kernel_size=3, stride=2, padding=1)  # 1/4
      x = self.block1(x)  # 1/8
      x = self.block2(x)  # 1/16
  
      # Decoder
      x = self.depthwise_separable0(x)
      shortcut_shape = paddle.shape(shortcut)[2:]
      x = F.interpolate(
          x,
          shortcut_shape,
          mode="bilinear",
          align_corners=self.align_corners,
      )
      x = paddle.concat(x=[shortcut, x], axis=1)
      x = self.depthwise_separable1(x)
  
      logit = self.depthwise_separable2(x)
      logit = F.interpolate(
          logit,
          input_shape,
          mode="bilinear",
          align_corners=self.align_corners,
      )
  
      return [logit]
  
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 2 for calling the PPHumanSegLite obj's underlying member method code with example usage: obj.forward(x) and returns: list