mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 19:41:56 +08:00
fix https://github.com/RVC-Boss/GPT-SoVITS/issues/2250
This commit is contained in:
parent
03b662a769
commit
28bdff356f
@ -429,26 +429,25 @@ def train_and_evaluate(
|
|||||||
# scalar_dict.update({"loss/g/{}".format(i): v for i, v in enumerate(losses_gen)})
|
# scalar_dict.update({"loss/g/{}".format(i): v for i, v in enumerate(losses_gen)})
|
||||||
# scalar_dict.update({"loss/d_r/{}".format(i): v for i, v in enumerate(losses_disc_r)})
|
# scalar_dict.update({"loss/d_r/{}".format(i): v for i, v in enumerate(losses_disc_r)})
|
||||||
# scalar_dict.update({"loss/d_g/{}".format(i): v for i, v in enumerate(losses_disc_g)})
|
# scalar_dict.update({"loss/d_g/{}".format(i): v for i, v in enumerate(losses_disc_g)})
|
||||||
image_dict = {
|
image_dict=None
|
||||||
"slice/mel_org": utils.plot_spectrogram_to_numpy(
|
try:###Some people installed the wrong version of matplotlib.
|
||||||
y_mel[0].data.cpu().numpy()
|
image_dict = {
|
||||||
),
|
"slice/mel_org": utils.plot_spectrogram_to_numpy(
|
||||||
"slice/mel_gen": utils.plot_spectrogram_to_numpy(
|
y_mel[0].data.cpu().numpy()
|
||||||
y_hat_mel[0].data.cpu().numpy()
|
),
|
||||||
),
|
"slice/mel_gen": utils.plot_spectrogram_to_numpy(
|
||||||
"all/mel": utils.plot_spectrogram_to_numpy(
|
y_hat_mel[0].data.cpu().numpy()
|
||||||
mel[0].data.cpu().numpy()
|
),
|
||||||
),
|
"all/mel": utils.plot_spectrogram_to_numpy(
|
||||||
"all/stats_ssl": utils.plot_spectrogram_to_numpy(
|
mel[0].data.cpu().numpy()
|
||||||
stats_ssl[0].data.cpu().numpy()
|
),
|
||||||
),
|
"all/stats_ssl": utils.plot_spectrogram_to_numpy(
|
||||||
}
|
stats_ssl[0].data.cpu().numpy()
|
||||||
utils.summarize(
|
),
|
||||||
writer=writer,
|
}
|
||||||
global_step=global_step,
|
except:pass
|
||||||
images=image_dict,
|
if image_dict:utils.summarize(writer=writer,global_step=global_step,images=image_dict,scalars=scalar_dict,)
|
||||||
scalars=scalar_dict,
|
else:utils.summarize(writer=writer,global_step=global_step,scalars=scalar_dict,)
|
||||||
)
|
|
||||||
global_step += 1
|
global_step += 1
|
||||||
if epoch % hps.train.save_every_epoch == 0 and rank == 0:
|
if epoch % hps.train.save_every_epoch == 0 and rank == 0:
|
||||||
if hps.train.if_save_latest == 0:
|
if hps.train.if_save_latest == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user