docstr: downsample layer
  
  Args:
      ch_in (int): input channel
      ch_out (int): output channel
      filter_size (int): filter size, default 3
      stride (int): stride, default 2
      padding (int): padding size, default 1
      norm_type (str): batch norm type, default bn
      norm_decay (str): decay for weight and bias of batch norm layer, default 0.
      freeze_norm (bool): whether to freeze norm, default False
      data_format (str): data format, NCHW or NHWC
docstr_tok: ["downsample","layer","Args",":","ch_in","(","int",")",":","input","channel","ch_out","(","int",")",":","output","channel","filter_size","(","int",")",":","filter","size",",","default","3","stride","(","int",")",":","stride",",","default","2","padding","(","int",")",":","padding","size",",","default","1","norm_type","(","str",")",":","batch","norm","type",",","default","bn","norm_decay","(","str",")",":","decay","for","weight","and","bias","of","batch","norm","layer",",","default","0.","freeze_norm","(","bool",")",":","whether","to","freeze","norm",",","default","False","data_format","(","str",")",":","data","format",",","NCHW","or","NHWC"]
code: def __init__(
      self,
      ch_in,
      ch_out,
      filter_size=3,
      stride=2,
      padding=1,
      norm_type="bn",
      norm_decay=0.0,
      freeze_norm=False,
      data_format="NCHW",
  ):
      """
      downsample layer
  
      Args:
          ch_in (int): input channel
          ch_out (int): output channel
          filter_size (int): filter size, default 3
          stride (int): stride, default 2
          padding (int): padding size, default 1
          norm_type (str): batch norm type, default bn
          norm_decay (str): decay for weight and bias of batch norm layer, default 0.
          freeze_norm (bool): whether to freeze norm, default False
          data_format (str): data format, NCHW or NHWC
      """
  
      super(DownSample, self).__init__()
  
      self.conv_bn_layer = ConvBNLayer(
          ch_in=ch_in,
          ch_out=ch_out,
          filter_size=filter_size,
          stride=stride,
          padding=padding,
          norm_type=norm_type,
          norm_decay=norm_decay,
          freeze_norm=freeze_norm,
          data_format=data_format,
      )
      self.ch_out = ch_out
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.modeling.ops import batch_norm, mish
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new DownSample object from inherited base classes: nn with example: obj = DownSample(ch_in, ch_out, filter_size, stride, padding, norm_type, norm_decay, freeze_norm, data_format)