mirror of https://github.com/coqui-ai/TTS.git
load test sent from a file
This commit is contained in:
parent
4d3de7cb4c
commit
9c7cb80634
16
train.py
16
train.py
|
@ -255,12 +255,16 @@ def evaluate(model, criterion, criterion_st, ap, current_step, epoch):
|
||||||
avg_decoder_loss = 0
|
avg_decoder_loss = 0
|
||||||
avg_stop_loss = 0
|
avg_stop_loss = 0
|
||||||
print("\n > Validation")
|
print("\n > Validation")
|
||||||
test_sentences = [
|
if c.test_sentences_file is None:
|
||||||
"It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",
|
test_sentences = [
|
||||||
"Be a voice, not an echo.",
|
"It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",
|
||||||
"I'm sorry Dave. I'm afraid I can't do that.",
|
"Be a voice, not an echo.",
|
||||||
"This cake is great. It's so delicious and moist."
|
"I'm sorry Dave. I'm afraid I can't do that.",
|
||||||
]
|
"This cake is great. It's so delicious and moist."
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
with open(c.test_sentences_file, "r") as f:
|
||||||
|
test_sentences = [s.strip() for s in f.readlines()]
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
if data_loader is not None:
|
if data_loader is not None:
|
||||||
for num_iter, data in enumerate(data_loader):
|
for num_iter, data in enumerate(data_loader):
|
||||||
|
|
Loading…
Reference in New Issue