class_docstr: Multiscale Vision Transformers
  Haoqi Fan, Bo Xiong, Karttikeya Mangalam, Yanghao Li, Zhicheng Yan, Jitendra Malik,
  Christoph Feichtenhofer
  https://arxiv.org/abs/2104.11227
  
  ::
  
                                     PatchEmbed
                                         ↓
                                 PositionalEncoding
                                         ↓
                                      Dropout
                                         ↓
                                   Normalization
                                         ↓
                                       Block 1
                                         ↓
                                         .
                                         .
                                         .
                                         ↓
                                       Block N
                                         ↓
                                   Normalization
                                         ↓
                                        Head
  
  
  The builder can be found in `create_mvit`.
class_docstr_tok: ["Multiscale","Vision","Transformers","Haoqi","Fan",",","Bo","Xiong",",","Karttikeya","Mangalam",",","Yanghao","Li",",","Zhicheng","Yan",",","Jitendra","Malik",",","Christoph","Feichtenhofer","https",":","\/\/arxiv.org\/abs\/2104.11227",":",":","PatchEmbed","\u2193","PositionalEncoding","\u2193","Dropout","\u2193","Normalization","\u2193","Block","1","\u2193",".",".",".","\u2193","Block","N","\u2193","Normalization","\u2193","Head","The","builder","can","be","found","in","`","create_mvit","`","."]
docstr: Args:
      patch_embed (nn.Module): Patch embed module.
      cls_positional_encoding (nn.Module): Positional encoding module.
      pos_drop (Optional[nn.Module]): Dropout module after patch embed.
      blocks (nn.ModuleList): Stack of multi-scale transformer blocks.
      norm_layer (nn.Module): Normalization layer before head.
      head (Optional[nn.Module]): Head module.
docstr_tok: ["Args",":","patch_embed","(","nn.Module",")",":","Patch","embed","module",".","cls_positional_encoding","(","nn.Module",")",":","Positional","encoding","module",".","pos_drop","(","Optional","[","nn.Module","]",")",":","Dropout","module","after","patch","embed",".","blocks","(","nn.ModuleList",")",":","Stack","of","multi-scale","transformer","blocks",".","norm_layer","(","nn.Module",")",":","Normalization","layer","before","head",".","head","(","Optional","[","nn.Module","]",")",":","Head","module","."]
code: def __init__(
      self,
      *,
      patch_embed: Optional[nn.Module],
      cls_positional_encoding: nn.Module,
      pos_drop: Optional[nn.Module],
      blocks: nn.ModuleList,
      norm_embed: Optional[nn.Module],
      head: Optional[nn.Module],
  ) -> None:
      """
      Args:
          patch_embed (nn.Module): Patch embed module.
          cls_positional_encoding (nn.Module): Positional encoding module.
          pos_drop (Optional[nn.Module]): Dropout module after patch embed.
          blocks (nn.ModuleList): Stack of multi-scale transformer blocks.
          norm_layer (nn.Module): Normalization layer before head.
          head (Optional[nn.Module]): Head module.
      """
      super().__init__()
  
      assert hasattr(
          cls_positional_encoding, "patch_embed_shape"
      ), "cls_positional_encoding should have method patch_embed_shape."
  
      self.patch_embed = patch_embed or torch.nn.Identity()
      self.cls_positional_encoding = cls_positional_encoding
      self.pos_drop = pos_drop or torch.nn.Identity()
      self.blocks = blocks
      self.norm_embed = norm_embed or torch.nn.Identity()
      self.head = head or torch.nn.Identity()
  
      init_net_weights(self, init_std=0.02, style="vit")
  
file_path: pytorchvideo/pytorchvideo/models/vision_transformers.py
imports: import warnings
  from functools import partial
  from typing import Callable, List, Optional, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers import MultiScaleBlock, SpatioTemporalClsPositionalEncoding
  from pytorchvideo.layers.utils import round_width, set_attributes
  from pytorchvideo.models.head import create_vit_basic_head
  from pytorchvideo.models.weight_init import init_net_weights
  from torch.nn.common_types import _size_2_t, _size_3_t
  from .stem import create_conv_patch_embed
label_desc: Use image node_id 1 to create a new MultiscaleVisionTransformers object from inherited base classes: nn with example: obj = MultiscaleVisionTransformers()