class_docstr: See :func:`shifted_window_attention`.
class_docstr_tok: ["See",":","func",":","`","shifted_window_attention","`","."]
code: def get_relative_position_bias(self) -> torch.Tensor:
      return _get_relative_position_bias(
          self.relative_position_bias_table, self.relative_position_index, self.window_size  # type: ignore[arg-type]
      )
  
imports: import math
  from functools import partial
  from typing import Any, Callable, List, Optional
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from ..ops.misc import MLP, Permute
  from ..ops.stochastic_depth import StochasticDepth
  from ..transforms._presets import ImageClassification, InterpolationMode
  from ..utils import _log_api_usage_once
  from ._api import register_model, Weights, WeightsEnum
  from ._meta import _IMAGENET_CATEGORIES
  from ._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 4 for calling the ShiftedWindowAttention obj's underlying member method code with example usage: obj.get_relative_position_bias() and returns: _get_relative_position_bias