mirror of https://github.com/coqui-ai/TTS.git
bug fixes for logging
This commit is contained in:
parent
72ad58d893
commit
d99623e285
7
train.py
7
train.py
|
@ -94,7 +94,10 @@ def train(model, criterion, criterion_st, optimizer, optimizer_st, scheduler,
|
||||||
avg_step_time = 0
|
avg_step_time = 0
|
||||||
avg_loader_time = 0
|
avg_loader_time = 0
|
||||||
print("\n > Epoch {}/{}".format(epoch, c.epochs), flush=True)
|
print("\n > Epoch {}/{}".format(epoch, c.epochs), flush=True)
|
||||||
batch_n_iter = int(len(data_loader.dataset) / (c.batch_size * num_gpus))
|
if use_cuda:
|
||||||
|
batch_n_iter = int(len(data_loader.dataset) / (c.batch_size * num_gpus))
|
||||||
|
else:
|
||||||
|
batch_n_iter = int(len(data_loader.dataset) / c.batch_size)
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
for num_iter, data in enumerate(data_loader):
|
for num_iter, data in enumerate(data_loader):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
@ -423,7 +426,7 @@ def evaluate(model, criterion, criterion_st, ap, global_step, epoch):
|
||||||
model, test_sentence, c, use_cuda, ap,
|
model, test_sentence, c, use_cuda, ap,
|
||||||
speaker_id=speaker_id,
|
speaker_id=speaker_id,
|
||||||
style_wav=style_wav)
|
style_wav=style_wav)
|
||||||
file_path = os.path.join(AUDIO_PATH, str(current_step))
|
file_path = os.path.join(AUDIO_PATH, str(global_step))
|
||||||
os.makedirs(file_path, exist_ok=True)
|
os.makedirs(file_path, exist_ok=True)
|
||||||
file_path = os.path.join(file_path,
|
file_path = os.path.join(file_path,
|
||||||
"TestSentence_{}.wav".format(idx))
|
"TestSentence_{}.wav".format(idx))
|
||||||
|
|
|
@ -17,7 +17,7 @@ _ID_TO_PHONEMES = {i: s for i, s in enumerate(phonemes)}
|
||||||
# Regular expression matching text enclosed in curly braces:
|
# Regular expression matching text enclosed in curly braces:
|
||||||
_CURLY_RE = re.compile(r'(.*?)\{(.+?)\}(.*)')
|
_CURLY_RE = re.compile(r'(.*?)\{(.+?)\}(.*)')
|
||||||
|
|
||||||
# Regular expression matchinf punctuations, ignoring empty space
|
# Regular expression matching punctuations, ignoring empty space
|
||||||
PHONEME_PUNCTUATION_PATTERN = r'['+_phoneme_punctuations+']+'
|
PHONEME_PUNCTUATION_PATTERN = r'['+_phoneme_punctuations+']+'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue