class_docstr: Positional encoding module until v.0.5.2.
class_docstr_tok: ["Positional","encoding","module","until","v.0.5.2","."]
code: def forward(self, x):
      x = x + self.alpha * self.pe[:, : x.size(1)]
      return self.dropout(x)
  
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 2 for calling the LegacyScaledPositionalEncoding obj's underlying member method code with example usage: obj.forward(x) and returns: self