MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / forward

Method forward

kokoro/modules.py:79–88  ·  view source on GitHub ↗
(self, x, s)

Source from the content-addressed store, hash-verified

77 self.fc = nn.Linear(style_dim, channels*2)
78
79 def forward(self, x, s):
80 x = x.transpose(-1, -2)
81 x = x.transpose(1, -1)
82 h = self.fc(s)
83 h = h.view(h.size(0), h.size(1), 1)
84 gamma, beta = torch.chunk(h, chunks=2, dim=1)
85 gamma, beta = gamma.transpose(1, -1), beta.transpose(1, -1)
86 x = F.layer_norm(x, (self.channels,), eps=self.eps)
87 x = (1 + gamma) * x + beta
88 return x.transpose(1, -1).transpose(-1, -2)
89
90
91class ProsodyPredictor(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected