mirror of https://github.com/coqui-ai/TTS.git
pick best model by loss function is run_eval is true
This commit is contained in:
parent
e12bbc2a5c
commit
0308c92c16
5
train.py
5
train.py
|
@ -429,7 +429,10 @@ def main(args):
|
||||||
" | > Train Loss: {:.5f} Validation Loss: {:.5f}".format(
|
" | > Train Loss: {:.5f} Validation Loss: {:.5f}".format(
|
||||||
train_loss, val_loss),
|
train_loss, val_loss),
|
||||||
flush=True)
|
flush=True)
|
||||||
best_loss = save_best_model(model, optimizer, train_loss, best_loss,
|
target_loss = train_loss
|
||||||
|
if c.run_eval:
|
||||||
|
target_loss = val_loss
|
||||||
|
best_loss = save_best_model(model, optimizer, target_loss, best_loss,
|
||||||
OUT_PATH, current_step, epoch)
|
OUT_PATH, current_step, epoch)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue