class_docstr: SplitSABlock
class_docstr_tok: ["SplitSABlock"]
code: def __init__(
      self,
      dim,
      num_heads,
      mlp_ratio=4.0,
      qkv_bias=False,
      qk_scale=None,
      drop=0.0,
      attn_drop=0.0,
      drop_path=0.0,
      act_layer=nn.GELU,
      norm_layer=nn.LayerNorm,
  ):
      super().__init__()
      self.pos_embed = conv_3x3x3(dim, dim, groups=dim)
      self.t_norm = norm_layer(dim)
      self.t_attn = MultiHeadAttention(
          dim,
          num_heads=num_heads,
          qkv_bias=qkv_bias,
          qk_scale=qk_scale,
          attn_drop_ratio=attn_drop,
          proj_drop_ratio=drop,
      )
      self.norm1 = norm_layer(dim)
      self.attn = MultiHeadAttention(
          dim,
          num_heads=num_heads,
          qkv_bias=qkv_bias,
          qk_scale=qk_scale,
          attn_drop_ratio=attn_drop,
          proj_drop_ratio=drop,
      )
      # NOTE: drop path for stochastic depth, we shall see if this is better than dropout here
      self.drop_path = (
          DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
      )
      self.norm2 = norm_layer(dim)
      mlp_hidden_dim = int(dim * mlp_ratio)
      self.mlp = Mlp(
          in_features=dim,
          hidden_features=mlp_hidden_dim,
          act_layer=act_layer,
          drop=drop,
      )
  
imports: from collections import OrderedDict
  import torch
  from torch import nn
  from torch.utils import checkpoint
  from functools import partial
  from towhee.models.utils.general_utils import to_2tuple
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.layers.droppath import DropPath
  from towhee.models.layers.mlp import Mlp
  from towhee.models.layers.attention import MultiHeadAttention
  from towhee.models.uniformer.config import _C
  import os
label_desc: Use image node_id 1 to create a new SplitSABlock object from inherited base classes: nn with example: obj = SplitSABlock(dim, num_heads, mlp_ratio, qkv_bias, qk_scale, drop, attn_drop, drop_path, act_layer, norm_layer)