mirror of https://github.com/coqui-ai/TTS.git
bug fix
This commit is contained in:
parent
91d97686c0
commit
855dd365b5
6
train.py
6
train.py
|
@ -94,6 +94,9 @@ def train(model, criterion, criterion_st, data_loader, optimizer, epoch):
|
||||||
|
|
||||||
optimizer.zero_grad()
|
optimizer.zero_grad()
|
||||||
|
|
||||||
|
stop_target = stop_target.view(c.batch_size, stop_target.size(1) // c.r, -1)
|
||||||
|
stop_target = (stop_target.sum(2) > 0.0).long()
|
||||||
|
|
||||||
# dispatch data to GPU
|
# dispatch data to GPU
|
||||||
if use_cuda:
|
if use_cuda:
|
||||||
text_input = text_input.cuda()
|
text_input = text_input.cuda()
|
||||||
|
@ -102,9 +105,6 @@ def train(model, criterion, criterion_st, data_loader, optimizer, epoch):
|
||||||
linear_spec = linear_spec.cuda()
|
linear_spec = linear_spec.cuda()
|
||||||
stop_target = stop_target.cuda()
|
stop_target = stop_target.cuda()
|
||||||
|
|
||||||
stop_target = stop_target.view(c.batch_size, stop_target.size(1) // c.r, -1)
|
|
||||||
stop_target = (stop_target.sum(2) > 0.0).long()
|
|
||||||
|
|
||||||
# create attention mask
|
# create attention mask
|
||||||
if c.mk > 0.0:
|
if c.mk > 0.0:
|
||||||
N = text_input.shape[1]
|
N = text_input.shape[1]
|
||||||
|
|
Loading…
Reference in New Issue