code: def __init__(
      self,
      dim,
      input_resolution,
      depth,
      activation,
      drop_path=0.0,
      downsample=None,
      out_dim=None,
      conv_expand_ratio=4.0,
  ):
      super().__init__()
      self.dim = dim
      self.input_resolution = input_resolution
      self.depth = depth
  
      # build blocks
      self.blocks = nn.LayerList(
          [
              MBConv(
                  dim,
                  dim,
                  conv_expand_ratio,
                  activation,
                  drop_path[i]
                  if isinstance(drop_path, list)
                  else drop_path,
              )
              for i in range(depth)
          ]
      )
  
      # patch merging layer
      if downsample is not None:
          self.downsample = downsample(
              input_resolution,
              dim=dim,
              out_dim=out_dim,
              activation=activation,
          )
      else:
          self.downsample = None
  
imports: import itertools
  import paddle
  from paddle import nn
  from paddle.nn import functional
  from .common import LayerNorm2d
label_desc: Use image node_id 1 to create a new ConvLayer object from inherited base classes: nn with example: obj = ConvLayer(dim, input_resolution, depth, activation, drop_path, downsample, out_dim, conv_expand_ratio)