class_docstr: Swin Transformer
      A PyTorch impl of : `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows`  -
        https://arxiv.org/pdf/2103.14030
  Args:
      img_size (int | tuple(int)): Input image size.
      patch_size (int | tuple(int)): Patch size.
      in_chans (int): Number of input channels.
      num_classes (int): Number of classes for classification head.
      embed_dim (int): Embedding dimension.
      depths (tuple(int)): Depth of Swin Transformer layers.
      num_heads (tuple(int)): Number of attention heads in different layers.
      window_size (int): Window size.
      mlp_ratio (float): Ratio of mlp hidden dim to embedding dim.
      qkv_bias (bool): If True, add a learnable bias to query, key, value. Default: Truee
      qk_scale (float): Override default qk scale of head_dim ** -0.5 if set.
      drop_rate (float): Dropout rate.
      attn_drop_rate (float): Attention dropout rate.
      drop_path_rate (float): Stochastic depth rate.
      norm_layer (nn.Module): normalization layer.
      ape (bool): If True, add absolute position embedding to the patch embedding.
      patch_norm (bool): If True, add normalization after patch embedding.
class_docstr_tok: ["Swin","Transformer","A","PyTorch","impl","of",":","`","Swin","Transformer",":","Hierarchical","Vision","Transformer","using","Shifted","Windows","`","-","https",":","\/\/arxiv.org\/pdf\/2103.14030","Args",":","img_size","(","int","|","tuple","(","int",")",")",":","Input","image","size",".","patch_size","(","int","|","tuple","(","int",")",")",":","Patch","size",".","in_chans","(","int",")",":","Number","of","input","channels",".","num_classes","(","int",")",":","Number","of","classes","for","classification","head",".","embed_dim","(","int",")",":","Embedding","dimension",".","depths","(","tuple","(","int",")",")",":","Depth","of","Swin","Transformer","layers",".","num_heads","(","tuple","(","int",")",")",":","Number","of","attention","heads","in","different","layers",".","window_size","(","int",")",":","Window","size",".","mlp_ratio","(","float",")",":","Ratio","of","mlp","hidden","dim","to","embedding","dim",".","qkv_bias","(","bool",")",":","If","True",",","add","a","learnable","bias","to","query",",","key",",","value",".","Default",":","Truee","qk_scale","(","float",")",":","Override","default","qk","scale","of","head_dim","*","*","-0.5","if","set",".","drop_rate","(","float",")",":","Dropout","rate",".","attn_drop_rate","(","float",")",":","Attention","dropout","rate",".","drop_path_rate","(","float",")",":","Stochastic","depth","rate",".","norm_layer","(","nn.Module",")",":","normalization","layer",".","ape","(","bool",")",":","If","True",",","add","absolute","position","embedding","to","the","patch","embedding",".","patch_norm","(","bool",")",":","If","True",",","add","normalization","after","patch","embedding","."]
code: def no_weight_decay_keywords(self):
      # todo: to be implemented
      return {"relative_position_bias_table"}
  
imports: import os
  import logging
  import torch
  import torch.nn
  import torch.nn.functional
  from functools import partial
  import torch.distributed
  from torch.nn.init import trunc_normal_
  from megatron.model.transformer import DropPath
  from megatron import get_args
  from megatron.model import LayerNorm
  import numpy
  from math import sqrt
label_desc: Use image node_id 4 for calling the SwinTransformer obj's underlying member method code with example usage: obj.no_weight_decay_keywords() and returns: unknown