class_docstr: Positional encoding module until v.0.5.2.
class_docstr_tok: ["Positional","encoding","module","until","v.0.5.2","."]
code: def __init__(self, d_model, dropout_rate, max_len=5000):
      super().__init__(
          d_model=d_model, dropout_rate=dropout_rate, max_len=max_len
      )
      self.alpha = torch.nn.Parameter(torch.tensor(1.0))
  
file_path: espnet/test/test_positional_encoding.py
imports: import pytest
  import torch
  from espnet.nets.pytorch_backend.transformer.embedding import LearnableFourierPosEnc, PositionalEncoding, ScaledPositionalEncoding
label_desc: Use image node_id 1 to create a new LegacyScaledPositionalEncoding object from inherited base classes: LegacyPositionalEncoding with example: obj = LegacyScaledPositionalEncoding(d_model, dropout_rate, max_len)