class_docstr: Implements 3D Swin Transformer from the `"Video Swin Transformer" <https://arxiv.org/abs/2106.13230>`_ paper.
  Args:
      patch_size (List[int]): Patch size.
      embed_dim (int): Patch embedding dimension.
      depths (List(int)): Depth of each Swin Transformer layer.
      num_heads (List(int)): Number of attention heads in different layers.
      window_size (List[int]): Window size.
      mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0.
      dropout (float): Dropout rate. Default: 0.0.
      attention_dropout (float): Attention dropout rate. Default: 0.0.
      stochastic_depth_prob (float): Stochastic depth rate. Default: 0.1.
      num_classes (int): Number of classes for classification head. Default: 400.
      norm_layer (nn.Module, optional): Normalization layer. Default: None.
      block (nn.Module, optional): SwinTransformer Block. Default: None.
      downsample_layer (nn.Module): Downsample layer (patch merging). Default: PatchMerging.
      patch_embed (nn.Module, optional): Patch Embedding layer. Default: None.
code: def forward(self, x: Tensor) -> Tensor:
      # x: B C T H W
      x = self.patch_embed(x)  # B _T _H _W C
      x = self.pos_drop(x)
      x = self.features(x)  # B _T _H _W C
      x = self.norm(x)
      x = x.permute(0, 4, 1, 2, 3)  # B, C, _T, _H, _W
      x = self.avgpool(x)
      x = torch.flatten(x, 1)
      x = self.head(x)
      return x
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from ...transforms._presets import VideoClassification
  from ...utils import _log_api_usage_once
  from .._api import register_model, Weights, WeightsEnum
  from .._meta import _KINETICS400_CATEGORIES
  from .._utils import _ovewrite_named_param, handle_legacy_interface
  from ..swin_transformer import PatchMerging, SwinTransformerBlock
label_desc: Use image node_id 2 for calling the SwinTransformer3d obj's underlying member method code with example usage: obj.forward(x) and returns: x