class_docstr: Global local filter.
  
  Args:
      dim (`int`): Feature dimension.
      h (`int`): Height.
      w (`int`): Width.
class_docstr_tok: ["Global","local","filter",".","Args",":","dim","(","`","int","`",")",":","Feature","dimension",".","h","(","`","int","`",")",":","Height",".","w","(","`","int","`",")",":","Width","."]
code: def __init__(self, dim, h=14, w=8):
      super().__init__()
      self.dw = nn.Conv2d(
          dim // 2,
          dim // 2,
          kernel_size=3,
          padding=1,
          bias=False,
          groups=dim // 2,
      )
      self.complex_weight = nn.Parameter(
          torch.randn(dim // 2, h, w, 2, dtype=torch.float32) * 0.02
      )
      trunc_normal_(self.complex_weight, std=0.02)
      self.pre_norm = LayerNorm(
          dim, eps=1e-6, data_format="channels_first"
      )
      self.post_norm = LayerNorm(
          dim, eps=1e-6, data_format="channels_first"
      )
  
file_path: towhee/towhee/models/hornet/utils.py
imports: import torch
  from torch import nn
  from towhee.models.layers.droppath import DropPath
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.convnext.utils import LayerNorm
label_desc: Use image node_id 1 to create a new GlobalLocalFilter object from inherited base classes: nn with example: obj = GlobalLocalFilter(dim, h, w)