code: def __init__(
      self,
      fs: int = 22050,
      w_step: int = 256,
      W: int = 2048,
      tau_max: int = 2048,
      midi_start: int = -5,
      midi_end: int = 75,
      octave_range: int = 24,
      use_token_averaged_ying: bool = False,
  ):
      super().__init__()
      self.fs = fs
      self.w_step = w_step
      self.W = W
      self.tau_max = tau_max
      self.use_token_averaged_ying = use_token_averaged_ying
      self.unfold = torch.nn.Unfold(
          (1, self.W), 1, 0, stride=(1, self.w_step)
      )
      midis = list(range(midi_start, midi_end))
      self.len_midis = len(midis)
      c_ms = torch.tensor(
          [self.midi_to_lag(m, octave_range) for m in midis]
      )
      self.register_buffer("c_ms", c_ms)
      self.register_buffer("c_ms_ceil", torch.ceil(self.c_ms).long())
      self.register_buffer("c_ms_floor", torch.floor(self.c_ms).long())
  
file_path: espnet/espnet2/tts/feats_extract/ying.py
imports: import math
  from typing import Any, Dict, Tuple, Union
  import torch
  from espnet2.tts.feats_extract.abs_feats_extract import AbsFeatsExtract
  from espnet2.tts.feats_extract.yin import *
  from espnet.nets.pytorch_backend.nets_utils import pad_list
label_desc: Use image node_id 1 to create a new Ying object from inherited base classes: AbsFeatsExtract with example: obj = Ying(fs, w_step, W, tau_max, midi_start, midi_end, octave_range, use_token_averaged_ying)