mirror of https://github.com/coqui-ai/TTS.git
optional proirity_freq
This commit is contained in:
parent
7bfdc32b7b
commit
c894919120
|
@ -17,6 +17,7 @@
|
||||||
"eval_batch_size":32,
|
"eval_batch_size":32,
|
||||||
"r": 5,
|
"r": 5,
|
||||||
"mk": 1.0,
|
"mk": 1.0,
|
||||||
|
"priority_freq": false,
|
||||||
|
|
||||||
"griffin_lim_iters": 60,
|
"griffin_lim_iters": 60,
|
||||||
"power": 1.2,
|
"power": 1.2,
|
||||||
|
|
8
train.py
8
train.py
|
@ -54,6 +54,12 @@ pickle.dump(c, open(tmp_path, "wb"))
|
||||||
LOG_DIR = OUT_PATH
|
LOG_DIR = OUT_PATH
|
||||||
tb = SummaryWriter(LOG_DIR)
|
tb = SummaryWriter(LOG_DIR)
|
||||||
|
|
||||||
|
if c.priority_freq:
|
||||||
|
n_priority_freq = int(3000 / (c.sample_rate * 0.5) * c.num_freq)
|
||||||
|
print(" > Using num priority freq. : {}".format(n_priority_freq))
|
||||||
|
else:
|
||||||
|
print(" > Priority freq. is disabled.")
|
||||||
|
|
||||||
|
|
||||||
def signal_handler(signal, frame):
|
def signal_handler(signal, frame):
|
||||||
"""Ctrl+C handler to remove empty experiment folder"""
|
"""Ctrl+C handler to remove empty experiment folder"""
|
||||||
|
@ -71,7 +77,6 @@ def train(model, criterion, data_loader, optimizer, epoch):
|
||||||
|
|
||||||
print(" | > Epoch {}/{}".format(epoch, c.epochs))
|
print(" | > Epoch {}/{}".format(epoch, c.epochs))
|
||||||
progbar = Progbar(len(data_loader.dataset) / c.batch_size)
|
progbar = Progbar(len(data_loader.dataset) / c.batch_size)
|
||||||
n_priority_freq = int(3000 / (c.sample_rate * 0.5) * c.num_freq)
|
|
||||||
progbar_display = {}
|
progbar_display = {}
|
||||||
for num_iter, data in enumerate(data_loader):
|
for num_iter, data in enumerate(data_loader):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
@ -214,7 +219,6 @@ def evaluate(model, criterion, data_loader, current_step):
|
||||||
|
|
||||||
print("\n | > Validation")
|
print("\n | > Validation")
|
||||||
progbar = Progbar(len(data_loader.dataset) / c.batch_size)
|
progbar = Progbar(len(data_loader.dataset) / c.batch_size)
|
||||||
n_priority_freq = int(3000 / (c.sample_rate * 0.5) * c.num_freq)
|
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
for num_iter, data in enumerate(data_loader):
|
for num_iter, data in enumerate(data_loader):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|
Loading…
Reference in New Issue