class_docstr: HR2O_NL module for ACAR head.
  
  Args:
      - hidden_dim (`int`):
          Hidden dimension.
      - kernel_size (`int`):
          Kernel size.
      - mlp_1x1 (`bool`):
          Whether to use 1 as kernel size.
class_docstr_tok: ["HR2O_NL","module","for","ACAR","head",".","Args",":","-","hidden_dim","(","`","int","`",")",":","Hidden","dimension",".","-","kernel_size","(","`","int","`",")",":","Kernel","size",".","-","mlp_1x1","(","`","bool","`",")",":","Whether","to","use","1","as","kernel","size","."]
code: def __init__(self, hidden_dim=512, kernel_size=3, mlp_1x1=False):
      super().__init__()
  
      self.hidden_dim = hidden_dim
  
      padding = kernel_size // 2
      self.conv_q = nn.Conv2d(
          hidden_dim,
          hidden_dim,
          kernel_size,
          padding=padding,
          bias=False,
      )
      self.conv_k = nn.Conv2d(
          hidden_dim,
          hidden_dim,
          kernel_size,
          padding=padding,
          bias=False,
      )
      self.conv_v = nn.Conv2d(
          hidden_dim,
          hidden_dim,
          kernel_size,
          padding=padding,
          bias=False,
      )
  
      self.conv = nn.Conv2d(
          hidden_dim,
          hidden_dim,
          1 if mlp_1x1 else kernel_size,
          padding=0 if mlp_1x1 else padding,
          bias=False,
      )
      self.norm = nn.GroupNorm(1, hidden_dim, affine=True)
      self.dp = nn.Dropout(0.2)
  
file_path: towhee/towhee/models/acar_net/head.py
imports: import math
  import torch
  from torch import nn
  import torchvision
label_desc: Use image node_id 1 to create a new HR2ONL object from inherited base classes: nn with example: obj = HR2ONL(hidden_dim, kernel_size, mlp_1x1)