code: def __init__(
      self,
      in_channels,
      out_channels,
      types="Pool",
      stride=[2, 1],
      sub_norm="nn.LayerNorm",
      act=None,
  ):
      super().__init__()
      self.types = types
      if types == "Pool":
          self.avgpool = nn.AvgPool2D(
              kernel_size=[3, 5], stride=stride, padding=[1, 2]
          )
          self.maxpool = nn.MaxPool2D(
              kernel_size=[3, 5], stride=stride, padding=[1, 2]
          )
          self.proj = nn.Linear(in_channels, out_channels)
      else:
          self.conv = nn.Conv2D(
              in_channels,
              out_channels,
              kernel_size=3,
              stride=stride,
              padding=1,
              weight_attr=ParamAttr(initializer=KaimingNormal()),
          )
      self.norm = eval(sub_norm)(out_channels)
      if act is not None:
          self.act = act()
      else:
          self.act = None
  
imports: from paddle import ParamAttr
  from paddle.nn.initializer import KaimingNormal
  import numpy
  import paddle
  import paddle.nn
  from paddle.nn.initializer import TruncatedNormal, Constant, Normal
label_desc: Use image node_id 1 to create a new SubSample object from inherited base classes: nn with example: obj = SubSample(in_channels, out_channels, types, stride, sub_norm, act)