mirror of
https://github.com/wassname/TTS.git
synced 2026-09-10 11:50:20 +08:00
guided attn #6
This commit is contained in:
@@ -115,7 +115,7 @@ def train(model, criterion, data_loader, optimizer, epoch):
|
||||
M[n, t] = val
|
||||
e_x = np.exp(M - np.max(M))
|
||||
M = e_x / e_x.sum(axis=0) # only difference
|
||||
M = Variable(torch.FloatTensor(M))
|
||||
M = Variable(torch.FloatTensor(M)).cuda()
|
||||
M = torch.stack([M]*32)
|
||||
|
||||
# forward pass
|
||||
|
||||
Reference in New Issue
Block a user