class_docstr: See :func:`shifted_window_attention_3d`.
code: def __init__(
      self,
      dim: int,
      window_size: List[int],
      shift_size: List[int],
      num_heads: int,
      qkv_bias: bool = True,
      proj_bias: bool = True,
      attention_dropout: float = 0.0,
      dropout: float = 0.0,
  ) -> None:
      super().__init__()
      if len(window_size) != 3 or len(shift_size) != 3:
          raise ValueError(
              "window_size and shift_size must be of length 2"
          )
  
      self.window_size = window_size  # Wd, Wh, Ww
      self.shift_size = shift_size
      self.num_heads = num_heads
      self.attention_dropout = attention_dropout
      self.dropout = dropout
  
      self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
      self.proj = nn.Linear(dim, dim, bias=proj_bias)
  
      self.define_relative_position_bias_table()
      self.define_relative_position_index()
  
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 1 to create a new ShiftedWindowAttention3d object from inherited base classes: nn with example: obj = ShiftedWindowAttention3d(dim, window_size, shift_size, num_heads, qkv_bias, proj_bias, attention_dropout, dropout)