class_docstr: The Transformer block.
  Args:
      dim (`int`):
          Number of features.
      num_heads (`int`):
          Number of heads.
      mlp_ratio (`int`):
          Ratio of mlp layer.
      qkv_bias (`bool`):
          If add bias to qkv layer.
      qk_scale (`float`):
          Number to scale qk.
      drop_ratio (`float`):
          Drop rate at the end of the block (mlp layer)
      attn_drop_ratio (`float`):
          Drop rate of attention layer
      drop_path_ratio (`float`):
          Drop rate of drop_path layer
      act_layer (`nn.Module`):
          Activation layer
      norm_layer (`nn.Module`):
          Normalization layer.
code: def __init__(
      self,
      dim,
      num_heads,
      mlp_ratio=4,
      qkv_bias=False,
      qk_scale=None,
      drop_ratio=0,
      attn_drop_ratio=0,
      drop_path_ratio=0,
      act_layer=GELU,
      norm_layer=LayerNorm,
  ):
      super().__init__()
      self.norm1 = norm_layer(dim)
      self.attn = MultiHeadAttention(
          dim=dim,
          num_heads=num_heads,
          qkv_bias=qkv_bias,
          qk_scale=qk_scale,
          attn_drop_ratio=attn_drop_ratio,
          proj_drop_ratio=drop_ratio,
      )
      self.drop_path = (
          DropPath(drop_prob=drop_path_ratio)
          if drop_path_ratio > 0
          else nn.Identity()
      )
      self.norm2 = norm_layer(dim)
      self.mlp = Mlp(
          in_features=dim,
          hidden_features=int(dim * mlp_ratio),
          act_layer=act_layer,
          drop=drop_ratio,
      )
  
      self.add1 = Add()
      self.add2 = Add()
      self.clone1 = Clone()
      self.clone2 = Clone()
  
file_path: towhee/towhee/models/vit/vit_block.py
imports: from torch import nn
  from towhee.models.layers.attention import MultiHeadAttention
  from towhee.models.layers.droppath import DropPath
  from towhee.models.layers.mlp import Mlp
  from towhee.models.layers.layers_with_relprop import GELU, LayerNorm, Add, Clone
label_desc: Use image node_id 1 to create a new Block object from inherited base classes: nn with example: obj = Block(dim, num_heads, mlp_ratio, qkv_bias, qk_scale, drop_ratio, attn_drop_ratio, drop_path_ratio, act_layer, norm_layer)