class_docstr: Implementation of the MaxViT proposed in:
  https://arxiv.org/pdf/2204.01697.pdf
  
  Args:
      in_channels (`int`):
          Number of input channels to the convolutional stem. Default 3
      depths (`Tuple[int, ...]`):
          Depth of each network stage. Default (2, 2, 5, 2)
      channels (`Tuple[int, ...]`):
          Number of channels in each network stage. Default (64, 128, 256, 512)
      num_classes (`int`):
          Number of classes to be predicted. Default 1000
      embed_dim (`int`):
          Embedding dimension of the convolutional stem. Default 64
      num_heads (`int`):
          Number of attention heads. Default 32
      grid_window_size (`Tuple[int, int]`):
          Grid/Window size to be utilized. Default (7, 7)
      attn_drop (`float`):
          Dropout ratio of attention weight. Default: 0.0
      drop (`float`):
          Dropout ratio of output. Default: 0.0
      drop_path (`float`):
          Dropout ratio of path. Default: 0.0
      mlp_ratio (`float`):
          Ratio of mlp hidden dim to embedding dim. Default: 4.0
      act_layer (`nn.Module`):
          Type of activation layer to be utilized. Default: nn.GELU
      norm_layer (`nn.Module`):
          Type of normalization layer to be utilized. Default: nn.BatchNorm2d
      norm_layer_transformer (`nn.Module`):
          Normalization layer in Transformer. Default: nn.LayerNorm
      global_pool (`str`):
          Global polling type to be utilized. Default "avg"
class_docstr_tok: ["Implementation","of","the","MaxViT","proposed","in",":","https",":","\/\/arxiv.org\/pdf\/2204.01697.pdf","Args",":","in_channels","(","`","int","`",")",":","Number","of","input","channels","to","the","convolutional","stem",".","Default","3","depths","(","`","Tuple","[","int",",","...","]","`",")",":","Depth","of","each","network","stage",".","Default","(","2",",","2",",","5",",","2",")","channels","(","`","Tuple","[","int",",","...","]","`",")",":","Number","of","channels","in","each","network","stage",".","Default","(","64",",","128",",","256",",","512",")","num_classes","(","`","int","`",")",":","Number","of","classes","to","be","predicted",".","Default","1000","embed_dim","(","`","int","`",")",":","Embedding","dimension","of","the","convolutional","stem",".","Default","64","num_heads","(","`","int","`",")",":","Number","of","attention","heads",".","Default","32","grid_window_size","(","`","Tuple","[","int",",","int","]","`",")",":","Grid\/Window","size","to","be","utilized",".","Default","(","7",",","7",")","attn_drop","(","`","float","`",")",":","Dropout","ratio","of","attention","weight",".","Default",":","0.0","drop","(","`","float","`",")",":","Dropout","ratio","of","output",".","Default",":","0.0","drop_path","(","`","float","`",")",":","Dropout","ratio","of","path",".","Default",":","0.0","mlp_ratio","(","`","float","`",")",":","Ratio","of","mlp","hidden","dim","to","embedding","dim",".","Default",":","4.0","act_layer","(","`","nn.Module","`",")",":","Type","of","activation","layer","to","be","utilized",".","Default",":","nn.GELU","norm_layer","(","`","nn.Module","`",")",":","Type","of","normalization","layer","to","be","utilized",".","Default",":","nn.BatchNorm2d","norm_layer_transformer","(","`","nn.Module","`",")",":","Normalization","layer","in","Transformer",".","Default",":","nn.LayerNorm","global_pool","(","`","str","`",")",":","Global","polling","type","to","be","utilized",".","Default","``","avg","''"]
docstr: Forward pass
  Args:
      data (`torch.Tensor`):
          Input images of the shape [B, C, H, W].
  Returns:
      output (`torch.Tensor`):
          Classification output of the shape [B, num_classes].
docstr_tok: ["Forward","pass","Args",":","data","(","`","torch.Tensor","`",")",":","Input","images","of","the","shape","[","B",",","C",",","H",",","W","]",".","Returns",":","output","(","`","torch.Tensor","`",")",":","Classification","output","of","the","shape","[","B",",","num_classes","]","."]
code: def forward(self, data: torch.Tensor) -> torch.Tensor:
      """Forward pass
      Args:
          data (`torch.Tensor`):
              Input images of the shape [B, C, H, W].
      Returns:
          output (`torch.Tensor`):
              Classification output of the shape [B, num_classes].
      """
      output = self.forward_features(self.stem(data))
      output = self.forward_head(output)
      return output
  
file_path: towhee/towhee/models/max_vit/max_vit.py
imports: from typing import Tuple, Optional
  import torch
  from torch import nn
  from towhee.models.max_vit.max_vit_block import MaxViTStage
  from towhee.models.max_vit.configs import get_configs
  from towhee.models.utils import create_model
label_desc: Use image node_id 5 for calling the MaxViT obj's underlying member method code with example usage: obj.forward(data) and returns: output