class_docstr: MultiHeadDampedEMA module definition.
  
  Args:
      size: Module size.
      num_heads: Number of attention heads.
      activation: Activation function type.
      truncation_length: Maximum length for truncation.
docstr: Reset module parameters.
  
  Args:
      val: Initialization value.
      std1: Main standard deviation.
      std2: Secondary standard deviation.
code: def reset_parameters(
      self, val: float = 0.0, std1: float = 0.2, std2: float = 1.0
  ) -> None:
      """Reset module parameters.
  
      Args:
          val: Initialization value.
          std1: Main standard deviation.
          std2: Secondary standard deviation.
  
      """
      with torch.no_grad():
          torch.nn.init.normal_(self.damping_factor, mean=val, std=std1)
          torch.nn.init.normal_(self.decay_factor, mean=val, std=std1)
  
          ema_exp_val = torch.ones(self.num_heads, 1)
  
          if self.num_heads > 1:
              idx = torch.tensor(list(range(1, self.num_heads, 2)))
              ema_exp_val.index_fill_(0, idx, -1.0)
  
          self.ema_expansion_matrix.normal_(mean=val, std=0.02).add_(
              ema_exp_val
          )
  
          torch.nn.init.normal_(
              self.kernel_projection_matrix, mean=val, std=std2
          )
          torch.nn.init.normal_(
              self.residual_weight, mean=val, std=std2
          )
  
file_path: espnet/espnet2/asr_transducer/decoder/modules/mega/multi_head_damped_ema.py
imports: import math
  from typing import Dict, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 2 for calling the MultiHeadDampedEMA obj's underlying member method code with example usage: obj.reset_parameters(val, std1, std2) without return types