class_docstr: RotaryRelativePositionBias module definition.
  
  Args:
      size: Module embedding size.
      max_positions: Maximum number of relative positions.
class_docstr_tok: ["RotaryRelativePositionBias","module","definition",".","Args",":","size",":","Module","embedding","size",".","max_positions",":","Maximum","number","of","relative","positions","."]
docstr: Construct a RotaryRelativePositionBias object.
docstr_tok: ["Construct","a","RotaryRelativePositionBias","object","."]
code: def __init__(self, size: int, max_positions: int = 2048) -> None:
      """Construct a RotaryRelativePositionBias object."""
      super().__init__()
  
      (
          self.sine,
          self.cosine,
      ) = RotaryRelativePositionBias.get_sinusoid_embeddings(
          max_positions, size
      )
  
      self.alpha = torch.nn.Parameter(torch.Tensor(1, size))
      self.beta = torch.nn.Parameter(torch.Tensor(1, size))
  
      self.register_buffer("_pe", torch.FloatTensor(1))
  
      self.size = size
      self.max_positions = max_positions
  
      self.reset_parameters()
  
file_path: espnet/espnet2/asr_transducer/decoder/modules/mega/positional_bias.py
imports: import math
  from typing import Tuple
  import torch
label_desc: Use image node_id 1 to create a new RotaryRelativePositionBias object from inherited base classes: torch.nn with example: obj = RotaryRelativePositionBias(size, max_positions)