class_docstr: Swin Transformer
  
  A PyTorch impl of : `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows`  -
        https://arxiv.org/pdf/2103.14030
class_docstr_tok: ["Swin","Transformer","A","PyTorch","impl","of",":","`","Swin","Transformer",":","Hierarchical","Vision","Transformer","using","Shifted","Windows","`","-","https",":","\/\/arxiv.org\/pdf\/2103.14030"]
code: def group_matcher(self, coarse=False):
      return dict(
          stem=r"^patch_embed",  # stem and embed
          blocks=r"^layers\.(\d+)"
          if coarse
          else [
              (r"^layers\.(\d+).downsample", (0,)),
              (r"^layers\.(\d+)\.\w+\.(\d+)", None),
              (r"^norm", (99999,)),
          ],
      )
  
imports: import logging
  import math
  from typing import Callable, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import PatchEmbed, Mlp, DropPath, ClassifierHead, to_2tuple, to_ntuple, trunc_normal_, _assert, use_fused_attn, resize_rel_pos_bias_table, resample_patch_embed
  from ._builder import build_model_with_cfg
  from ._features_fx import register_notrace_function
  from ._manipulate import checkpoint_seq, named_apply
  from ._registry import generate_default_cfgs, register_model, register_model_deprecations
  from .vision_transformer import get_init_weights_vit
label_desc: Use image node_id 4 for calling the SwinTransformer obj's underlying member method code with example usage: obj.group_matcher(coarse) and returns: dict