This commit is contained in:
Eren Golge 2018-04-25 05:39:09 -07:00
parent 6426c7b818
commit c82a17cfb2
1 changed files with 1 additions and 0 deletions

View File

@ -124,6 +124,7 @@ def train(model, criterion, data_loader, optimizer, epoch):
linear_spec_var[:, :, :n_priority_freq], linear_spec_var[:, :, :n_priority_freq],
mel_lengths_var) mel_lengths_var)
attention_loss = criterion(alignments, M, mel_lengths_var) attention_loss = criterion(alignments, M, mel_lengths_var)
print(mk)
loss = mel_loss + linear_loss + mk * attention_loss loss = mel_loss + linear_loss + mk * attention_loss
# backpass and check the grad norm # backpass and check the grad norm