MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / __init__

Method __init__

modules/parallel_wavegan/layers/upsample.py:19–31  ·  view source on GitHub ↗

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")

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected