Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TensorSpeech
GitHub Repository: TensorSpeech/TensorFlowTTS
Path: blob/master/examples/fastspeech2/conf/fastspeech2.v2.yaml
1559 views
1
# This is the hyperparameter configuration file for FastSpeech2 v2.
2
# the different of v2 and v1 is that v2 apply linformer technique.
3
# Please make sure this is adjusted for the LJSpeech dataset. If you want to
4
# apply to the other dataset, you might need to carefully change some parameters.
5
# This configuration performs 200k iters but a best checkpoint is around 150k iters.
6
7
###########################################################
8
# FEATURE EXTRACTION SETTING #
9
###########################################################
10
hop_size: 256 # Hop size.
11
format: "npy"
12
13
14
###########################################################
15
# NETWORK ARCHITECTURE SETTING #
16
###########################################################
17
model_type: "fastspeech2"
18
19
fastspeech2_params:
20
n_speakers: 1
21
encoder_hidden_size: 256
22
encoder_num_hidden_layers: 3
23
encoder_num_attention_heads: 2
24
encoder_attention_head_size: 16 # in v1, = 384//2
25
encoder_intermediate_size: 1024
26
encoder_intermediate_kernel_size: 3
27
encoder_hidden_act: "mish"
28
decoder_hidden_size: 256
29
decoder_num_hidden_layers: 3
30
decoder_num_attention_heads: 2
31
decoder_attention_head_size: 16 # in v1, = 384//2
32
decoder_intermediate_size: 1024
33
decoder_intermediate_kernel_size: 3
34
decoder_hidden_act: "mish"
35
variant_prediction_num_conv_layers: 2
36
variant_predictor_filter: 256
37
variant_predictor_kernel_size: 3
38
variant_predictor_dropout_rate: 0.5
39
num_mels: 80
40
hidden_dropout_prob: 0.2
41
attention_probs_dropout_prob: 0.1
42
max_position_embeddings: 2048
43
initializer_range: 0.02
44
output_attentions: False
45
output_hidden_states: False
46
47
###########################################################
48
# DATA LOADER SETTING #
49
###########################################################
50
batch_size: 16 # Batch size for each GPU with assuming that gradient_accumulation_steps == 1
51
remove_short_samples: true # Whether to remove samples the length of which are less than batch_max_steps.
52
allow_cache: true # Whether to allow cache in dataset. If true, it requires cpu memory.
53
mel_length_threshold: 32 # remove all targets has mel_length <= 32
54
is_shuffle: true # shuffle dataset after each epoch.
55
###########################################################
56
# OPTIMIZER & SCHEDULER SETTING #
57
###########################################################
58
optimizer_params:
59
initial_learning_rate: 0.001
60
end_learning_rate: 0.00005
61
decay_steps: 150000 # < train_max_steps is recommend.
62
warmup_proportion: 0.02
63
weight_decay: 0.001
64
65
gradient_accumulation_steps: 1
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
69
###########################################################
70
# INTERVAL SETTING #
71
###########################################################
72
train_max_steps: 200000 # Number of training steps.
73
save_interval_steps: 5000 # Interval steps to save checkpoint.
74
eval_interval_steps: 500 # Interval steps to evaluate the network.
75
log_interval_steps: 200 # Interval steps to record the training log.
76
delay_f0_energy_steps: 3 # 2 steps use LR outputs only then 1 steps LR + F0 + Energy.
77
###########################################################
78
# OTHER SETTING #
79
###########################################################
80
num_save_intermediate_results: 1 # Number of batch to be saved as intermediate results.
81
82