def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0):
    super().__init__()
    self.num_heads = num_heads
    head_dim = (dim // num_heads)
    self.scale = (qk_scale or (head_dim ** (- 0.5)))
    self.qkv = nn.Linear(dim, (dim * 3), bias=qkv_bias)
    self.attn_drop = nn.Dropout(attn_drop)
    self.proj = nn.Linear(dim, dim)
    self.proj_drop = nn.Dropout(proj_drop)
def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0):
    super().__init__()
    self.num_heads = num_heads
    head_dim = (dim // num_heads)
    self.scale = (qk_scale or (head_dim ** (- 0.5)))
    self.qkv = nn.Linear(dim, (dim * 3), bias=qkv_bias)
    self.attn_drop = nn.Dropout(attn_drop)
    self.proj = nn.Linear(dim, dim)
    self.proj_drop = nn.Dropout(proj_drop)