From fdca8402c721290b226145700ccf14f52d8febe0 Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Tue, 26 Mar 2019 15:46:26 +0100 Subject: [PATCH] config updates --- .compute | 2 +- config.json | 26 +++++++++++++------------- config_cluster.json | 2 +- layers/tacotron2.py | 4 ++-- utils/visual.py | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.compute b/.compute index 6b54f612..b32b318e 100644 --- a/.compute +++ b/.compute @@ -3,5 +3,5 @@ ls ${SHARED_DIR}/data/ pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl yes | apt-get install espeak python3 setup.py develop -python3 distribute.py --config_path config_cluster.json --data_path ${SHARED_DIR}/data/Blizzard/Nancy/ --restore_path ${USER_DIR}/checkpoint_187000_4378.pth.tar +python3 distribute.py --config_path config_cluster.json --data_path ${SHARED_DIR}/data/Blizzard/Nancy/ --restore_path ${USER_DIR}/checkpoint_266000_4400.pth.tar # python3 distribute.py --config_path config_cluster.json --data_path ${SHARED_DIR}/data/Blizzard/Nancy/ \ No newline at end of file diff --git a/config.json b/config.json index c41b1aa3..c645ab2b 100644 --- a/config.json +++ b/config.json @@ -21,7 +21,7 @@ "clip_norm": true, // clip normalized values into the range. "mel_fmin": 0.0, // minimum freq level for mel-spec. ~50 for male and ~95 for female voices. Tune for dataset!! "mel_fmax": 8000.0, // maximum freq level for mel-spec. Tune for dataset!! - "do_trim_silence": false // enable trimming of slience of audio as you load it. LJspeech (false), TWEB (false), Nancy (true) + "do_trim_silence": true // enable trimming of slience of audio as you load it. LJspeech (false), TWEB (false), Nancy (true) }, "distributed":{ @@ -29,10 +29,10 @@ "url": "tcp:\/\/localhost:54321" }, - "reinit_layers": ["model.decoder.attention_layer"], //set which layers to be reinitialized in finetunning. Only used if --restore_model is provided. + "reinit_layers": [], //set which layers to be reinitialized in finetunning. Only used if --restore_model is provided. "model": "Tacotron2", // one of the model in models/ - "grad_clip": 0.02, // upper limit for gradients for clipping. + "grad_clip": 1, // upper limit for gradients for clipping. "epochs": 1000, // total number of epochs to train. "lr": 0.0001, // Initial learning rate. If Noam decay is active, maximum learning rate. "lr_decay": false, // if true, Noam learning rate decaying is applied through training. @@ -44,25 +44,25 @@ "batch_size": 16, // Batch size for training. Lower values than 32 might cause hard to learn attention. "eval_batch_size":16, "r": 1, // Number of frames to predict for step. - "wd": 0.000002, // Weight decay weight. + "wd": 0.000001, // Weight decay weight. "checkpoint": true, // If true, it saves checkpoints per "save_step" "save_step": 1000, // Number of training steps expected to save traning stats and checkpoints. - "print_step": 10, // Number of steps to log traning on console. - "tb_model_param_stats": false, // true, plots param stats per layer on tensorboard. Might be memory consuming, but good for debugging. + "print_step": 100, // Number of steps to log traning on console. + "tb_model_param_stats": true, // true, plots param stats per layer on tensorboard. Might be memory consuming, but good for debugging. "batch_group_size": 8, //Number of batches to shuffle after bucketing. "run_eval": true, - "test_delay_epochs": 100, //Until attention is aligned, testing only wastes computation time. - "data_path": "/media/erogol/data_ssd/Data/LJSpeech-1.1", // DATASET-RELATED: can overwritten from command argument - "meta_file_train": "metadata_train.csv", // DATASET-RELATED: metafile for training dataloader. - "meta_file_val": "metadata_val.csv", // DATASET-RELATED: metafile for evaluation dataloader. - "dataset": "ljspeech", // DATASET-RELATED: one of TTS.dataset.preprocessors depending on your target dataset. Use "tts_cache" for pre-computed dataset by extract_features.py + "test_delay_epochs": 2, //Until attention is aligned, testing only wastes computation time. + "data_path": "/media/erogol/data_ssd/Data/Nancy/", // DATASET-RELATED: can overwritten from command argument + "meta_file_train": "prompts_train.data", // DATASET-RELATED: metafile for training dataloader. + "meta_file_val": "prompts_val.data", // DATASET-RELATED: metafile for evaluation dataloader. + "dataset": "nancy", // DATASET-RELATED: one of TTS.dataset.preprocessors depending on your target dataset. Use "tts_cache" for pre-computed dataset by extract_features.py "min_seq_len": 0, // DATASET-RELATED: minimum text length to use in training - "max_seq_len": 1000, // DATASET-RELATED: maximum text length + "max_seq_len": 120, // DATASET-RELATED: maximum text length "output_path": "/media/erogol/data_ssd/Data/models/ljspeech_models/", // DATASET-RELATED: output path for all training outputs. "num_loader_workers": 8, // number of training data loader processes. Don't set it too big. 4-8 are good values. "num_val_loader_workers": 4, // number of evaluation data loader processes. - "phoneme_cache_path": "ljspeech_us_phonemes", // phoneme computation is slow, therefore, it caches results in the given folder. + "phoneme_cache_path": "nancy_us_phonemes2", // phoneme computation is slow, therefore, it caches results in the given folder. "use_phonemes": true, // use phonemes instead of raw characters. It is suggested for better pronounciation. "phoneme_language": "en-us", // depending on your target language, pick one from https://github.com/bootphon/phonemizer#languages "text_cleaner": "phoneme_cleaners" diff --git a/config_cluster.json b/config_cluster.json index 96723b5c..4d3dc4d4 100644 --- a/config_cluster.json +++ b/config_cluster.json @@ -29,7 +29,7 @@ "url": "tcp:\/\/localhost:54321" }, - "reinit_layers": ["model.decoder.attention_layer"], + "reinit_layers": [], "model": "Tacotron2", // one of the model in models/ "grad_clip": 1, // upper limit for gradients for clipping. diff --git a/layers/tacotron2.py b/layers/tacotron2.py index 0935c3bb..1af72f34 100644 --- a/layers/tacotron2.py +++ b/layers/tacotron2.py @@ -125,8 +125,8 @@ class Attention(nn.Module): self._mask_value = -float("inf") self.windowing = windowing if self.windowing: - self.win_back = 1 - self.win_front = 3 + self.win_back = 3 + self.win_front = 6 self.win_idx = None self.norm = norm diff --git a/utils/visual.py b/utils/visual.py index 7efca05f..0df37815 100644 --- a/utils/visual.py +++ b/utils/visual.py @@ -37,7 +37,7 @@ def visualize(alignment, spectrogram_postnet, stop_tokens, text, hop_length, CON num_plot = 3 label_fontsize = 16 - plt.figure(figsize=(16, 48)) + plt.figure(figsize=(8, 24)) plt.subplot(num_plot, 1, 1) plt.imshow(alignment.T, aspect="auto", origin="lower", interpolation=None)