MCPcopy Index your code
hub / github.com/MoonInTheRiver/DiffSinger / run_model

Method run_model

tasks/tts/pe.py:128–137  ·  view source on GitHub ↗
(self, model, sample, return_output=False, infer=False)

Source from the content-addressed store, hash-verified

126 return outputs
127
128 def run_model(self, model, sample, return_output=False, infer=False):
129 f0 = sample['f0']
130 uv = sample['uv']
131 output = model(sample['mels'])
132 losses = {}
133 self.add_pitch_loss(output, sample, losses)
134 if not return_output:
135 return losses
136 else:
137 return losses, output
138
139 def plot_pitch(self, batch_idx, model_out, sample):
140 gt_f0 = denorm_f0(sample['f0'], sample['uv'], hparams)

Callers 2

_training_stepMethod · 0.95
validation_stepMethod · 0.95

Calls 1

add_pitch_lossMethod · 0.95

Tested by

no test coverage detected