class_docstr: Multi-head attention with relative positional encoding.
  This concept was proposed in the "Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context"
  Args:
      d_model (int): The dimension of model
      num_heads (int): The number of attention heads.
  Inputs: query, key, value, pos_embedding, mask
      - **query** (batch, time, dim): Tensor containing query vector
      - **key** (batch, time, dim): Tensor containing key vector
      - **value** (batch, time, dim): Tensor containing value vector
      - **pos_embedding** (batch, time, dim): Positional embedding tensor
      - **mask** (batch, 1, time2) or (batch, time1, time2): Tensor containing indices to be masked
  Returns:
      - **outputs**: Tensor produces by relative multi head attention module.
code: def __init__(
      self,
      d_model: int = 512,
      num_heads: int = 16,
  ):
      super().__init__()
      assert (
          d_model % num_heads == 0
      ), "d_model % num_heads should be zero."
      self.d_model = d_model
      self.d_head = int(d_model / num_heads)
      self.num_heads = num_heads
      self.sqrt_dim = math.sqrt(d_model)
  
      self.query_proj = nn.Linear(d_model, d_model)
      self.key_proj = nn.Linear(d_model, d_model, bias=False)
      self.value_proj = nn.Linear(d_model, d_model, bias=False)
      self.pos_proj = nn.Linear(d_model, d_model, bias=False)
  
      self.u_bias = nn.Parameter(
          torch.Tensor(self.num_heads, self.d_head)
      )
      self.v_bias = nn.Parameter(
          torch.Tensor(self.num_heads, self.d_head)
      )
      torch.nn.init.xavier_uniform_(self.u_bias)
      torch.nn.init.xavier_uniform_(self.v_bias)
      self.out_proj = nn.Linear(d_model, d_model)
  
imports: import math
  from typing import Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from TTS.tts.layers.delightful_tts.conv_layers import Conv1dGLU, DepthWiseConv1d, PointwiseConv1d
  from TTS.tts.layers.delightful_tts.networks import GLUActivation
label_desc: Use image node_id 1 to create a new RelativeMultiHeadAttention object from inherited base classes: nn with example: obj = RelativeMultiHeadAttention(d_model, num_heads)