class_docstr: Gather And Expansion Layer with stride 2
class_docstr_tok: ["Gather","And","Expansion","Layer","with","stride","2"]
code: def __init__(self, in_dim: int, out_dim: int, expand: int):
      super().__init__()
  
      expand_dim = expand * in_dim
  
      self.branch_1 = nn.Sequential(
          layers.ConvBNReLU(in_dim, in_dim, 3),
          layers.DepthwiseConvBN(in_dim, expand_dim, 3, stride=2),
          layers.DepthwiseConvBN(expand_dim, expand_dim, 3),
          layers.ConvBN(expand_dim, out_dim, 1),
      )
  
      self.branch_2 = nn.Sequential(
          layers.DepthwiseConvBN(in_dim, in_dim, 3, stride=2),
          layers.ConvBN(in_dim, out_dim, 1),
      )
  
imports: import os
  from typing import Union, List, Tuple
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddlehub.module.module import moduleinfo
  import paddlehub.vision.segmentation_transforms
  from paddlehub.module.cv_module import ImageSegmentationModule
  import bisenet_cityscapes.layers
label_desc: Use image node_id 1 to create a new GatherAndExpansionLayer2 object from inherited base classes: nn with example: obj = GatherAndExpansionLayer2(in_dim, out_dim, expand)