mirror of https://github.com/coqui-ai/TTS.git
guided attn #4
This commit is contained in:
parent
937d1140f4
commit
9d6c08ab72
2
train.py
2
train.py
|
@ -115,7 +115,7 @@ def train(model, criterion, data_loader, optimizer, epoch):
|
||||||
M[n, t] = val
|
M[n, t] = val
|
||||||
e_x = np.exp(M - np.max(M))
|
e_x = np.exp(M - np.max(M))
|
||||||
M = e_x / e_x.sum(axis=0) # only difference
|
M = e_x / e_x.sum(axis=0) # only difference
|
||||||
M = Variable(M)
|
M = Variable(torch.FloatTensor(M))
|
||||||
M = torch.stack([M]*32)
|
M = torch.stack([M]*32)
|
||||||
|
|
||||||
# forward pass
|
# forward pass
|
||||||
|
|
Loading…
Reference in New Issue