guided attn #7

This commit is contained in:
Eren Golge 2018-04-24 11:34:11 -07:00
parent 60a0721bf3
commit 622987771a
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ def train(model, criterion, data_loader, optimizer, epoch):
+ 0.5 * criterion(linear_output[:, :, :n_priority_freq],
linear_spec_var[:, :, :n_priority_freq],
mel_lengths_var)
print(M.shape)
print(alignments.shape)
attention_loss = criterion(M, alignments, mel_lengths_var)
loss = mel_loss + linear_loss + 0.2 * attention_loss