mirror of https://github.com/coqui-ai/TTS.git
Save best model based on train loss
This commit is contained in:
parent
b7be415396
commit
d1d7cd9977
5
.compute
5
.compute
|
@ -3,5 +3,6 @@
|
|||
# ls /snakepit/jobs/650/keep/
|
||||
source /snakepit/jobs/650/keep/venv/bin/activate
|
||||
# source /snakepit/jobs/560/tmp/venv/bin/activate
|
||||
python extract_feats.py --data_path /snakepit/shared/data/keithito/LJSpeech-1.1/wavs --out_path /snakepit/shared/data/keithito/LJSpeech-1.1/loader_data/ --config config.json --num_proc 8
|
||||
python train.py --config_path config.json --debug true
|
||||
# python extract_feats.py --data_path /snakepit/shared/data/keithito/LJSpeech-1.1/wavs --out_path /snakepit/shared/data/keithito/LJSpeech-1.1/loader_data/ --config config.json --num_proc 32
|
||||
CUDA_VISIBLE_DEVICES="1" python train.py --config_path config.json --debug true
|
||||
# nvidia-smi
|
||||
|
|
2
train.py
2
train.py
|
@ -410,7 +410,7 @@ def main(args):
|
|||
train_loss, current_step = train(model, criterion, criterion_st, train_loader, optimizer, optimizer_st, ap, epoch)
|
||||
val_loss = evaluate(model, criterion, criterion_st, val_loader, ap, current_step)
|
||||
print(" | > Train Loss: {:.5f} Validation Loss: {:.5f}".format(train_loss, val_loss))
|
||||
best_loss = save_best_model(model, optimizer, val_loss,
|
||||
best_loss = save_best_model(model, optimizer, train_loss,
|
||||
best_loss, OUT_PATH,
|
||||
current_step, epoch)
|
||||
|
||||
|
|
Loading…
Reference in New Issue