class_docstr: This class implements the relative multihead implementation similar to that in Transformer XL
  https://arxiv.org/pdf/1901.02860.pdf
  
  Arguments
  ---------
  embed_dim : int
      Size of the encoder feature vectors from which keys and values are computed.
  num_heads: int
      Number of attention heads.
  dropout : float, optional
      Dropout rate.
  vbias: bool, optional
      Whether to use bias for computing value.
  vdim: int, optional
      Size for value. Default is embed_dim (Note each head is embed_dim // num_heads).
  mask_pos_future: bool, optional
      Whether to mask future positional encodings values.
      Must be true for causal applications e.g. decoder.
  Example
  -------
  >>> inputs = torch.rand([6, 60, 512])
  >>> pos_emb = torch.rand([1, 2*60-1, 512])
  >>> net = RelPosMHAXL(num_heads=8, embed_dim=inputs.shape[-1])
  >>> outputs, attn = net(inputs, inputs, inputs, pos_emb)
  >>> outputs.shape
  torch.Size([6, 60, 512])
code: def _reset_parameters(self):
      if self._qkv_same_embed_dim:
          torch.nn.init.xavier_uniform_(self.in_proj_weight)
      else:
          torch.nn.init.xavier_uniform_(self.qk_proj_weight)
          torch.nn.init.xavier_uniform_(self.v_proj_weight)
  
      if self.vbias is not None:
          torch.nn.init.constant_(self.value_bias_weight, 0.0)
  
      # positional biases
      torch.nn.init.xavier_uniform_(self.pos_bias_u)
      torch.nn.init.xavier_uniform_(self.pos_bias_v)
  
imports: import torch
  import logging
  import torch.nn
  import numpy
  from typing import Optional
  from speechbrain.dataio.dataio import length_to_mask
  import torch.nn.functional
  import math
label_desc: Use image node_id 2 for calling the RelPosMHAXL obj's underlying member method code with example usage: obj._reset_parameters() without return types