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

Method __init__

tasks/tts/fs2.py:30–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28
29class FastSpeech2Task(TtsTask):
30 def __init__(self):
31 super(FastSpeech2Task, self).__init__()
32 self.dataset_cls = FastSpeechDataset
33 self.mse_loss_fn = torch.nn.MSELoss()
34 mel_losses = hparams['mel_loss'].split("|")
35 self.loss_and_lambda = {}
36 for i, l in enumerate(mel_losses):
37 if l == '':
38 continue
39 if ':' in l:
40 l, lbd = l.split(":")
41 lbd = float(lbd)
42 else:
43 lbd = 1.0
44 self.loss_and_lambda[l] = lbd
45 print("| Mel losses:", self.loss_and_lambda)
46 self.sil_ph = self.phone_encoder.sil_phonemes()
47
48 @data_loader
49 def train_dataloader(self):

Callers

nothing calls this directly

Calls 1

sil_phonemesMethod · 0.80

Tested by

no test coverage detected