class_docstr: Block
class_docstr_tok: ["Block"]
code: def __init__(
      self,
      dim,
      num_heads,
      mlp_ratio,
      drop_path=0.0,
      norm_layer=nn.LayerNorm,
      sr_ratio=1,
      block_type="wave",
  ):
      super().__init__()
      self.norm1 = norm_layer(dim)
      self.norm2 = norm_layer(dim)
  
      if block_type == "std_att":
          self.attn = Attention(dim, num_heads)
      else:
          self.attn = WaveAttention(dim, num_heads, sr_ratio)
      self.mlp = PVT2FFN(
          in_features=dim, hidden_features=int(dim * mlp_ratio)
      )
      self.drop_path = (
          DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
      )
      self.apply(init_vit_weights)
  
imports: import torch
  from torch import nn
  from timm.models.layers import DropPath
  import numpy
  from towhee.models.wave_vit.wave_vit_utils import DWT2D, IDWT2D
  from towhee.models.utils.init_vit_weights import init_vit_weights
  from towhee.models.layers.mlp import Mlp
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, drop_path, norm_layer, sr_ratio, block_type)