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

Method forward

modules/parallel_wavegan/layers/upsample.py:33–44  ·  view source on GitHub ↗

Calculate forward propagation. Args: x (Tensor): Input tensor (B, C, F, T). Returns: Tensor: Interpolated tensor (B, C, F * y_scale, T * x_scale),

(self, x)

Source from the content-addressed store, hash-verified

31 self.mode = mode
32
33 def forward(self, x):
34 """Calculate forward propagation.
35
36 Args:
37 x (Tensor): Input tensor (B, C, F, T).
38
39 Returns:
40 Tensor: Interpolated tensor (B, C, F * y_scale, T * x_scale),
41
42 """
43 return F.interpolate(
44 x, scale_factor=(self.y_scale, self.x_scale), mode=self.mode)
45
46
47class Conv2d(torch.nn.Conv2d):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected