class_docstr: The ESPNetV1 implementation based on PaddlePaddle.
  
  The original article refers to
    Sachin Mehta1, Mohammad Rastegari, Anat Caspi, Linda Shapiro, and Hannaneh Hajishirzi. "ESPNet: Efficient Spatial Pyramid of Dilated Convolutions for Semantic Segmentation"
    (https://arxiv.org/abs/1803.06815).
  
  Args:
      num_classes (int): The unique number of target classes.
      in_channels (int, optional): Number of input channels. Default: 3.
      level2_depth (int, optional): Depth of DilatedResidualBlock. Default: 2.
      level3_depth (int, optional): Depth of DilatedResidualBlock. Default: 3.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","ESPNetV1","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Sachin","Mehta1",",","Mohammad","Rastegari",",","Anat","Caspi",",","Linda","Shapiro",",","and","Hannaneh","Hajishirzi",".","``","ESPNet",":","Efficient","Spatial","Pyramid","of","Dilated","Convolutions","for","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/abs\/1803.06815",")",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","in_channels","(","int",",","optional",")",":","Number","of","input","channels",".","Default",":","3.","level2_depth","(","int",",","optional",")",":","Depth","of","DilatedResidualBlock",".","Default",":","2.","level3_depth","(","int",",","optional",")",":","Depth","of","DilatedResidualBlock",".","Default",":","3.","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(
      self,
      num_classes,
      in_channels=3,
      level2_depth=2,
      level3_depth=3,
      pretrained=None,
  ):
      super().__init__()
      self.encoder = ESPNetEncoder(
          num_classes, in_channels, level2_depth, level3_depth
      )
  
      self.level3_up = nn.Conv2DTranspose(
          num_classes,
          num_classes,
          2,
          stride=2,
          padding=0,
          output_padding=0,
          bias_attr=False,
      )
      self.br3 = layers.SyncBatchNorm(num_classes)
      self.level2_proj = nn.Conv2D(
          in_channels + 128, num_classes, 1, bias_attr=False
      )
      self.combine_l2_l3 = nn.Sequential(
          BNPReLU(2 * num_classes),
          DilatedResidualBlock(
              2 * num_classes, num_classes, residual=False
          ),
      )
      self.level2_up = nn.Sequential(
          nn.Conv2DTranspose(
              num_classes,
              num_classes,
              2,
              stride=2,
              padding=0,
              output_padding=0,
              bias_attr=False,
          ),
          BNPReLU(num_classes),
      )
      self.out_proj = layers.ConvBNPReLU(
          16 + in_channels + num_classes,
          num_classes,
          3,
          padding="same",
          stride=1,
      )
      self.out_up = nn.Conv2DTranspose(
          num_classes,
          num_classes,
          2,
          stride=2,
          padding=0,
          output_padding=0,
          bias_attr=False,
      )
      self.pretrained = pretrained
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.models import layers
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new ESPNetV1 object from inherited base classes: nn with example: obj = ESPNetV1(num_classes, in_channels, level2_depth, level3_depth, pretrained)