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

Method plot_mel

tasks/tts/fs2.py:289–294  ·  view source on GitHub ↗
(self, batch_idx, spec, spec_out, name=None)

Source from the content-addressed store, hash-verified

287 # validation plots
288 ############
289 def plot_mel(self, batch_idx, spec, spec_out, name=None):
290 spec_cat = torch.cat([spec, spec_out], -1)
291 name = f'mel_{batch_idx}' if name is None else name
292 vmin = hparams['mel_vmin']
293 vmax = hparams['mel_vmax']
294 self.logger.experiment.add_figure(name, spec_to_figure(spec_cat[0], vmin, vmax), self.global_step)
295
296 def plot_dur(self, batch_idx, sample, model_out):
297 T_txt = sample['txt_tokens'].shape[1]

Callers 5

validation_stepMethod · 0.95
validation_stepMethod · 0.80
validation_stepMethod · 0.80
validation_stepMethod · 0.80
validation_stepMethod · 0.80

Calls 1

spec_to_figureFunction · 0.90

Tested by

no test coverage detected