class_docstr: ScaleNorm module definition.
  
  Reference: https://arxiv.org/pdf/1910.05895.pdf
  
  Args:
      normalized_shape: Expected size.
      eps: Value added to the denominator for numerical stability.
class_docstr_tok: ["ScaleNorm","module","definition",".","Reference",":","https",":","\/\/arxiv.org\/pdf\/1910.05895.pdf","Args",":","normalized_shape",":","Expected","size",".","eps",":","Value","added","to","the","denominator","for","numerical","stability","."]
docstr: Compute scale normalization.
  
  Args:
      x: Input sequences. (B, T, D_hidden)
  
  Returns:
      : Output sequences. (B, T, D_hidden)
docstr_tok: ["Compute","scale","normalization",".","Args",":","x",":","Input","sequences",".","(","B",",","T",",","D_hidden",")","Returns",":",":","Output","sequences",".","(","B",",","T",",","D_hidden",")"]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Compute scale normalization.
  
      Args:
          x: Input sequences. (B, T, D_hidden)
  
      Returns:
          : Output sequences. (B, T, D_hidden)
  
      """
      norm = self.scale / torch.norm(x, dim=-1, keepdim=True).clamp(
          min=self.eps
      )
  
      return x * norm
  
file_path: espnet/espnet2/asr_transducer/normalization.py
imports: from typing import Dict, Optional, Tuple
  import torch
label_desc: Use image node_id 2 for calling the ScaleNorm obj's underlying member method code with example usage: obj.forward(x) and returns: unknown