minor fix

This commit is contained in:
chenfeiyu 2021-04-07 10:55:05 +08:00
parent 4d3014f4d5
commit 5011f16c10
2 changed files with 2 additions and 2 deletions

View File

@ -495,7 +495,7 @@ class Tacotron2Decoder(nn.Layer):
if int(paddle.argmax(alignment[0])) == T_enc - 1: if int(paddle.argmax(alignment[0])) == T_enc - 1:
if (first_hit_end is None): if (first_hit_end is None):
first_hit_end = i first_hit_end = i
if first_hit_end is not None and i > (first_hit_end + 6): if first_hit_end is not None and i > (first_hit_end + 10):
print("content exhausted!") print("content exhausted!")
break break
if len(mel_outputs) == max_decoder_steps: if len(mel_outputs) == max_decoder_steps:

View File

@ -115,7 +115,7 @@ class TacotronVCTKExperiment(ExperimentBase):
self.optimizer.step() self.optimizer.step()
iteration_time = time.time() - start iteration_time = time.time() - start
losses_np = {k: float(v) for k, v in losses.items()} losses_np = {k: float(v.detach()) for k, v in losses.items()}
# logging # logging
msg = "Rank: {}, ".format(dist.get_rank()) msg = "Rank: {}, ".format(dist.get_rank())
msg += "step: {}, ".format(self.iteration) msg += "step: {}, ".format(self.iteration)