class_docstr: Patch Merging Layer.
  
  Args:
      input_resolution (tuple[int]): Resolution of input feature.
      dim (int): Number of input channels.
      norm_layer (nn.Module, optional): Normalization layer.  Default: nn.LayerNorm
code: def flops(self):
      H, W = self.input_resolution
      flops = H * W * self.dim
      flops += (H // 2) * (W // 2) * 4 * self.dim * 2 * self.dim
      return flops
  
imports: from typing import List, Optional
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from vissl.config import AttrDict
  from vissl.models.model_helpers import DropPath, to_2tuple, trunc_normal_
  from vissl.models.trunks import register_model_trunk
label_desc: Use image node_id 4 for calling the PatchMerging obj's underlying member method code with example usage: obj.flops() and returns: flops