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

Method __init__

usr/diff/net.py:59–64  ·  view source on GitHub ↗
(self, encoder_hidden, residual_channels, dilation)

Source from the content-addressed store, hash-verified

57
58class ResidualBlock(nn.Module):
59 def __init__(self, encoder_hidden, residual_channels, dilation):
60 super().__init__()
61 self.dilated_conv = Conv1d(residual_channels, 2 * residual_channels, 3, padding=dilation, dilation=dilation)
62 self.diffusion_projection = Linear(residual_channels, residual_channels)
63 self.conditioner_projection = Conv1d(encoder_hidden, 2 * residual_channels, 1)
64 self.output_projection = Conv1d(residual_channels, 2 * residual_channels, 1)
65
66 def forward(self, x, conditioner, diffusion_step):
67 diffusion_step = self.diffusion_projection(diffusion_step).unsqueeze(-1)

Callers

nothing calls this directly

Calls 3

LinearFunction · 0.85
Conv1dFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected