class_docstr: gnConv: Recursive Gated Convolution
  
  Args:
      dim (`int`): Feature dimension.
      order (`int`): Order to expand dimensions.
      gflayer (`nn.Module`): Global filter.
      h (`int`): Height.
      w (`int`): Width.
      s (`float`): Scale ratio.
class_docstr_tok: ["gnConv",":","Recursive","Gated","Convolution","Args",":","dim","(","`","int","`",")",":","Feature","dimension",".","order","(","`","int","`",")",":","Order","to","expand","dimensions",".","gflayer","(","`","nn.Module","`",")",":","Global","filter",".","h","(","`","int","`",")",":","Height",".","w","(","`","int","`",")",":","Width",".","s","(","`","float","`",")",":","Scale","ratio","."]
code: def __init__(self, dim, order=5, gflayer=None, h=14, w=8, s=1.0):
      super().__init__()
      self.order = order
      self.dims = [dim // 2**i for i in range(order)]
      self.dims.reverse()
      self.proj_in = nn.Conv2d(dim, 2 * dim, 1)
  
      if gflayer is None:
          self.dwconv = nn.Conv2d(
              sum(self.dims),
              sum(self.dims),
              kernel_size=7,
              padding=(7 - 1) // 2,
              bias=True,
              groups=sum(self.dims),
          )
      else:
          self.dwconv = gflayer(sum(self.dims), h=h, w=w)
  
      self.proj_out = nn.Conv2d(dim, dim, 1)
  
      self.pws = nn.ModuleList(
          [
              nn.Conv2d(self.dims[i], self.dims[i + 1], 1)
              for i in range(order - 1)
          ]
      )
  
      self.scale = s
  
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 GatedConv object from inherited base classes: nn with example: obj = GatedConv(dim, order, gflayer, h, w, s)