docstr: x: [B, H*W, C]
code: def call(self, x, H, W):
      """
      x: [B, H*W, C]
      """
      B, L, C = x.shape
      assert L == H * W, "input feature has wrong size"
  
      x = tf.reshape(x, [B, H, W, C])
      # padding
      # 如果输入feature map的H，W不是2的整数倍，需要进行padding
      pad_input = (H % 2 != 0) or (W % 2 != 0)
      if pad_input:
          paddings = tf.constant([[0, 0], [0, 1], [0, 1], [0, 0]])
          x = tf.pad(x, paddings)
  
      x0 = x[:, 0::2, 0::2, :]  # [B, H/2, W/2, C]
      x1 = x[:, 1::2, 0::2, :]  # [B, H/2, W/2, C]
      x2 = x[:, 0::2, 1::2, :]  # [B, H/2, W/2, C]
      x3 = x[:, 1::2, 1::2, :]  # [B, H/2, W/2, C]
      x = tf.concat([x0, x1, x2, x3], -1)  # [B, H/2, W/2, 4*C]
      x = tf.reshape(x, [B, -1, 4 * C])  # [B, H/2*W/2, 4*C]
  
      x = self.norm(x)
      x = self.reduction(x)  # [B, H/2*W/2, 2*C]
  
      return x
  
imports: import tensorflow
  from tensorflow.keras import Model, layers, initializers
  import numpy
label_desc: Use image node_id 2 for calling the PatchMerging obj's underlying member method code with example usage: obj.call(x, H, W) and returns: x