class_docstr: Stage of the MaxViT.
  Args:
      depth (int): Depth of the stage.
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      num_heads (int, optional): Number of attention heads. Default 32
      grid_window_size (Tuple[int, int], optional): Grid/Window size to be utilized. Default (7, 7)
      attn_drop (float, optional): Dropout ratio of attention weight. Default: 0.0
      drop (float, optional): Dropout ratio of output. Default: 0.0
      drop_path (float, optional): Dropout ratio of path. Default: 0.0
      mlp_ratio (float, optional): Ratio of mlp hidden dim to embedding dim. Default: 4.0
      act_layer (Type[nn.Module], optional): Type of activation layer to be utilized. Default: nn.GELU
      norm_layer (Type[nn.Module], optional): Type of normalization layer to be utilized. Default: nn.BatchNorm2d
      norm_layer_transformer (Type[nn.Module], optional): Normalization layer in Transformer. Default: nn.LayerNorm
class_docstr_tok: ["Stage","of","the","MaxViT",".","Args",":","depth","(","int",")",":","Depth","of","the","stage",".","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","num_heads","(","int",",","optional",")",":","Number","of","attention","heads",".","Default","32","grid_window_size","(","Tuple","[","int",",","int","]",",","optional",")",":","Grid\/Window","size","to","be","utilized",".","Default","(","7",",","7",")","attn_drop","(","float",",","optional",")",":","Dropout","ratio","of","attention","weight",".","Default",":","0.0","drop","(","float",",","optional",")",":","Dropout","ratio","of","output",".","Default",":","0.0","drop_path","(","float",",","optional",")",":","Dropout","ratio","of","path",".","Default",":","0.0","mlp_ratio","(","float",",","optional",")",":","Ratio","of","mlp","hidden","dim","to","embedding","dim",".","Default",":","4.0","act_layer","(","Type","[","nn.Module","]",",","optional",")",":","Type","of","activation","layer","to","be","utilized",".","Default",":","nn.GELU","norm_layer","(","Type","[","nn.Module","]",",","optional",")",":","Type","of","normalization","layer","to","be","utilized",".","Default",":","nn.BatchNorm2d","norm_layer_transformer","(","Type","[","nn.Module","]",",","optional",")",":","Normalization","layer","in","Transformer",".","Default",":","nn.LayerNorm"]
docstr: Forward pass.
  Args:
      data (torch.Tensor): Input tensor of the shape [B, C_in, H, W].
  Returns:
      output (torch.Tensor): Output tensor of the shape [B, C_out, H // 2, W // 2].
docstr_tok: ["Forward","pass",".","Args",":","data","(","torch.Tensor",")",":","Input","tensor","of","the","shape","[","B",",","C_in",",","H",",","W","]",".","Returns",":","output","(","torch.Tensor",")",":","Output","tensor","of","the","shape","[","B",",","C_out",",","H","\/\/","2",",","W","\/\/","2","]","."]
code: def forward(self, data=torch.Tensor) -> torch.Tensor:
      """Forward pass.
      Args:
          data (torch.Tensor): Input tensor of the shape [B, C_in, H, W].
      Returns:
          output (torch.Tensor): Output tensor of the shape [B, C_out, H // 2, W // 2].
      """
      output = self.blocks(data)
      return output
  
file_path: towhee/towhee/models/max_vit/max_vit_block.py
imports: from typing import Tuple, Union, List, Type, Callable
  import torch
  from torch import nn
  from timm.models.layers import Mlp, DropPath
  from towhee.models.layers.relative_self_attention import RelativeSelfAttention
  from towhee.models.layers.mbconv import MBConv
  from towhee.models.max_vit.max_vit_utils import window_reverse, window_partition, grid_reverse, grid_partition
label_desc: Use image node_id 2 for calling the MaxViTStage obj's underlying member method code with example usage: obj.forward(data) and returns: output