From 653fd14b1fb19cdcf4285adcf49f802b8c9b243d Mon Sep 17 00:00:00 2001 From: Erdene-Ochir Tuguldur Date: Sat, 6 Apr 2019 14:40:22 +0200 Subject: [PATCH] fix tensorboardX behaviour --- train-ssrn.py | 2 +- train-text2mel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/train-ssrn.py b/train-ssrn.py index 2c34cb7..86f9cc9 100755 --- a/train-ssrn.py +++ b/train-ssrn.py @@ -110,7 +110,7 @@ def train(train_epoch, phase='train'): 'l1': "%.05f" % (running_l1_loss / it) }) logger.log_step(phase, global_step, {'loss_l1': l1_loss}, - {'mags-true': M[0, :, :], 'mags-pred': Z[0, :, :], 'mels': S[0, :, :]}) + {'mags-true': M[:1, :, :], 'mags-pred': Z[:1, :, :], 'mels': S[:1, :, :]}) if global_step % 5000 == 0: # checkpoint at every 5000th step save_checkpoint(logger.logdir, train_epoch, global_step, ssrn, optimizer) diff --git a/train-text2mel.py b/train-text2mel.py index cb011a2..6e52efd 100755 --- a/train-text2mel.py +++ b/train-text2mel.py @@ -137,7 +137,7 @@ def W_nt(_, n, t, g=0.2): 'att': "%.05f" % (running_att_loss / it) }) logger.log_step(phase, global_step, {'loss_l1': l1_loss, 'loss_att': att_loss}, - {'mels-true': S[0, :, :], 'mels-pred': Y[0, :, :], 'attention': A[0, :, :]}) + {'mels-true': S[:1, :, :], 'mels-pred': Y[:1, :, :], 'attention': A[:1, :, :]}) if global_step % 5000 == 0: # checkpoint at every 5000th step save_checkpoint(logger.logdir, train_epoch, global_step, text2mel, optimizer)