Initialize Stretch2d module. Args: x_scale (int): X scaling factor (Time axis in spectrogram). y_scale (int): Y scaling factor (Frequency axis in spectrogram). mode (str): Interpolation mode.
(self, x_scale, y_scale, mode="nearest")
| 17 | """Stretch2d module.""" |
| 18 | |
| 19 | def __init__(self, x_scale, y_scale, mode="nearest"): |
| 20 | """Initialize Stretch2d module. |
| 21 | |
| 22 | Args: |
| 23 | x_scale (int): X scaling factor (Time axis in spectrogram). |
| 24 | y_scale (int): Y scaling factor (Frequency axis in spectrogram). |
| 25 | mode (str): Interpolation mode. |
| 26 | |
| 27 | """ |
| 28 | super(Stretch2d, self).__init__() |
| 29 | self.x_scale = x_scale |
| 30 | self.y_scale = y_scale |
| 31 | self.mode = mode |
| 32 | |
| 33 | def forward(self, x): |
| 34 | """Calculate forward propagation. |