class_docstr: A basic EfficientVit building block.
  
  Args:
      dim (int): Number of input channels.
      key_dim (int): Dimension for query and key in the token mixer.
      num_heads (int): Number of attention heads.
      attn_ratio (int): Multiplier for the query dim for value dimension.
      resolution (int): Input resolution.
      window_resolution (int): Local window resolution.
      kernels (List[int]): The kernel size of the dw conv on query.
class_docstr_tok: ["A","basic","EfficientVit","building","block",".","Args",":","dim","(","int",")",":","Number","of","input","channels",".","key_dim","(","int",")",":","Dimension","for","query","and","key","in","the","token","mixer",".","num_heads","(","int",")",":","Number","of","attention","heads",".","attn_ratio","(","int",")",":","Multiplier","for","the","query","dim","for","value","dimension",".","resolution","(","int",")",":","Input","resolution",".","window_resolution","(","int",")",":","Local","window","resolution",".","kernels","(","List","[","int","]",")",":","The","kernel","size","of","the","dw","conv","on","query","."]
code: def __init__(
      self,
      dim,
      key_dim,
      num_heads=8,
      attn_ratio=4,
      resolution=14,
      window_resolution=7,
      kernels=[5, 5, 5, 5],
  ):
      super().__init__()
  
      self.dw0 = ResidualDrop(
          ConvNorm(dim, dim, 3, 1, 1, groups=dim, bn_weight_init=0.0)
      )
      self.ffn0 = ResidualDrop(ConvMlp(dim, int(dim * 2)))
  
      self.mixer = ResidualDrop(
          LocalWindowAttention(
              dim,
              key_dim,
              num_heads,
              attn_ratio=attn_ratio,
              resolution=resolution,
              window_resolution=window_resolution,
              kernels=kernels,
          )
      )
  
      self.dw1 = ResidualDrop(
          ConvNorm(dim, dim, 3, 1, 1, groups=dim, bn_weight_init=0.0)
      )
      self.ffn1 = ResidualDrop(ConvMlp(dim, int(dim * 2)))
  
imports: import itertools
  from collections import OrderedDict
  from typing import Dict
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import SqueezeExcite, SelectAdaptivePool2d, trunc_normal_, _assert
  from ._builder import build_model_with_cfg
  from ._manipulate import checkpoint_seq
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 1 to create a new EfficientVitBlock object from inherited base classes: torch.nn with example: obj = EfficientVitBlock(dim, key_dim, num_heads, attn_ratio, resolution, window_resolution, kernels)