class_docstr: Multi-Head Attention layer of Transformer-XL with support of relative positional encoding.
  Paper: https://arxiv.org/abs/1901.02860
  Args:
      n_head (int): number of heads
      n_feat (int): size of the features
      dropout_rate (float): dropout rate
      proj_dim (int, optional): Optional integer value for projection before computing attention.
          If None, then there is no projection (equivalent to proj_dim = n_feat).
          If > 0, then will project the n_feat to proj_dim before calculating attention.
          If <0, then will equal n_head, so that each head has a projected dimension of 1.
      adapter_strategy: By default, MHAResidualAddAdapterStrategyConfig. An adapter composition function object.
code: def reset_parameters(self):
      with torch.no_grad():
          nn.init.zeros_(self.linear_out.weight)
          nn.init.zeros_(self.linear_out.bias)
  
          # NOTE: This exact procedure apparently highly important.
          # Above operation is safe to do as self.linear_out.weight *= 0.0 (similar for bias)
          # However:
          # DO NOT REPLACE BELOW WITH self.pos_bias_u *= 0.0 OR self.pos_bias_v *= 0.0
          # For some reason at init sometimes it will cause the value of the tensor to become NaN
          # All operations to compute matrix_ac and matrix_bd will then fail.
          nn.init.zeros_(self.pos_bias_u)
          nn.init.zeros_(self.pos_bias_v)
  
imports: import math
  from dataclasses import dataclass, field
  from typing import Any, Optional
  import torch
  from torch import nn
  from nemo.collections.asr.parts.submodules import multi_head_attention
  from nemo.collections.common.parts import adapter_modules
  from nemo.core.classes.mixins import adapter_mixin_strategies
label_desc: Use image node_id 3 for calling the RelPositionMultiHeadAttentionAdapter obj's underlying member method code with example usage: obj.reset_parameters() without return types