class_docstr: Patch Merging Layer
  
  Args:
      dim (int): Number of input channels.
      norm_layer (nn.Layer, optional): Normalization layer.  Default: nn.LayerNorm
class_docstr_tok: ["Patch","Merging","Layer","Args",":","dim","(","int",")",":","Number","of","input","channels",".","norm_layer","(","nn.Layer",",","optional",")",":","Normalization","layer",".","Default",":","nn.LayerNorm"]
code: def __init__(self, dim, norm_layer=nn.LayerNorm):
      super().__init__()
      self.dim = dim
      self.reduction = nn.Linear(4 * dim, 2 * dim, bias_attr=False)
      self.norm = norm_layer(4 * dim)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils
  from paddleseg.models.backbones.transformer_utils import *
label_desc: Use image node_id 1 to create a new PatchMerging object from inherited base classes: nn with example: obj = PatchMerging(dim, norm_layer)