class_docstr: RelativePositionBias module definition.
  
  Args:
      max_positions: Maximum number of relative positions.
class_docstr_tok: ["RelativePositionBias","module","definition",".","Args",":","max_positions",":","Maximum","number","of","relative","positions","."]
docstr: Construct a RelativePositionBias object.
docstr_tok: ["Construct","a","RelativePositionBias","object","."]
code: def __init__(self, max_positions: int) -> None:
      """Construct a RelativePositionBias object."""
      super().__init__()
  
      self.max_positions = max_positions
  
      self.relative_position_bias = torch.nn.Parameter(
          torch.Tensor(2 * self.max_positions - 1)
      )
  
      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 RelativePositionBias object from inherited base classes: torch.nn with example: obj = RelativePositionBias(max_positions)