MCPcopy Create free account
hub / github.com/MYZY-AI/Muyan-TTS / forward

Method forward

sovits/module/modules.py:366–373  ·  view source on GitHub ↗
(self, x, x_mask, reverse=False, **kwargs)

Source from the content-addressed store, hash-verified

364
365class Log(nn.Module):
366 def forward(self, x, x_mask, reverse=False, **kwargs):
367 if not reverse:
368 y = torch.log(torch.clamp_min(x, 1e-5)) * x_mask
369 logdet = torch.sum(-y, [1, 2])
370 return y, logdet
371 else:
372 x = torch.exp(x) * x_mask
373 return x
374
375
376class Flip(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected