Skip to content

Commit ffcc42c

Browse files
authored
Merge branch 'master' into add-lbttspt
2 parents ede4c30 + 5fa2995 commit ffcc42c

File tree

16 files changed

+147
-23
lines changed

16 files changed

+147
-23
lines changed

examples/fastspeech/conf/fastspeech.v1.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ optimizer_params:
6161
warmup_proportion: 0.02
6262
weight_decay: 0.001
6363

64-
64+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
65+
# must separate by |. if var_train_expr is null then we
66+
# training all variable
6567
###########################################################
6668
# INTERVAL SETTING #
6769
###########################################################

examples/fastspeech/conf/fastspeech.v3.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ optimizer_params:
6161
warmup_proportion: 0.02
6262
weight_decay: 0.001
6363

64-
64+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
65+
# must separate by |. if var_train_expr is null then we
66+
# training all variable
6567
###########################################################
6668
# INTERVAL SETTING #
6769
###########################################################

examples/fastspeech2/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ If you want to finetune a model, use `--pretrained` like this with your model fi
3636
--pretrained pretrained.h5
3737
```
3838

39+
You can also define `var_train_expr` in config file to let model training only on some layers in case you want to fine-tune on your dataset with the same pretrained language and processor. For example, `var_train_expr: "embeddings|encoder|decoder"` means we just training all variables that `embeddings`, `encoder`, `decoder` exist in its name.
40+
3941

4042
### Step 3: Decode mel-spectrogram from folder ids
4143

examples/fastspeech2/conf/fastspeech2.baker.v2.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ optimizer_params:
6363
warmup_proportion: 0.02
6464
weight_decay: 0.001
6565

66-
66+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
67+
# must separate by |. if var_train_expr is null then we
68+
# training all variable
6769
###########################################################
6870
# INTERVAL SETTING #
6971
###########################################################

examples/fastspeech2/conf/fastspeech2.kss.v1.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ optimizer_params:
6262
warmup_proportion: 0.02
6363
weight_decay: 0.001
6464

65-
65+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
66+
# must separate by |. if var_train_expr is null then we
67+
# training all variable
6668
###########################################################
6769
# INTERVAL SETTING #
6870
###########################################################

examples/fastspeech2/conf/fastspeech2.kss.v2.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ optimizer_params:
6363
warmup_proportion: 0.02
6464
weight_decay: 0.001
6565

66-
66+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
67+
# must separate by |. if var_train_expr is null then we
68+
# training all variable
6769
###########################################################
6870
# INTERVAL SETTING #
6971
###########################################################

examples/fastspeech2/conf/fastspeech2.v1.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ optimizer_params:
6161
warmup_proportion: 0.02
6262
weight_decay: 0.001
6363

64-
64+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
65+
# must separate by |. if var_train_expr is null then we
66+
# training all variable
6567
###########################################################
6668
# INTERVAL SETTING #
6769
###########################################################

examples/fastspeech2/conf/fastspeech2.v2.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ optimizer_params:
6262
warmup_proportion: 0.02
6363
weight_decay: 0.001
6464

65-
65+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
66+
# must separate by |. if var_train_expr is null then we
67+
# training all variable
6668
###########################################################
6769
# INTERVAL SETTING #
6870
###########################################################

examples/fastspeech2_libritts/conf/fastspeech2libritts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ optimizer_params:
6161
warmup_proportion: 0.02
6262
weight_decay: 0.001
6363

64-
64+
var_train_expr: null # trainable variable expr (eg. 'embeddings|encoder|decoder' )
65+
# must separate by |. if var_train_expr is null then we
66+
# training all variable
6567
###########################################################
6668
# INTERVAL SETTING #
6769
###########################################################

examples/tacotron2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ tacotron2 = TFTacotron2(config=tacotron_config, training=True, name='tacotron2')
8787
tacotron2._build()
8888
tacotron2.summary()
8989
tacotron2.load_weights("./examples/tacotron2/exp/train.tacotron2.v1/checkpoints/model-120000.h5", by_name=True, skip_mismatch=True)
90-
9190
... # training as normal.
9291
```
92+
You can also define `var_train_expr` in config file to let model training only on some layers in case you want to fine-tune on your dataset with the same pretrained language and processor. For example, `var_train_expr: "embeddings|encoder|decoder"` means we just training all variables that `embeddings`, `encoder`, `decoder` exist in its name.
9393

9494
## Results
9595
Here is a result of tacotron2 based on this config [`tacotron2.v1.yaml`](https://github.com/dathudeptrai/TensorflowTTS/blob/tacotron-2-example/examples/tacotron-2/conf/tacotron2.v1.yaml) but with reduction_factor = 7, we will update learning curves for reduction_factor = 1.

0 commit comments

Comments
 (0)