Commit
·
ad478b7
1
Parent(s):
8fa5d45
hparams with no generated pointers
Browse files- hyperparams.yaml +87 -124
hyperparams.yaml
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
# Generated 2021-03-21 from:
|
2 |
-
# /home/mila/l/lugoschl/code/fork/speechbrain/recipes/timers-and-such/direct/hparams/train.yaml
|
3 |
-
# yamllint disable
|
4 |
# ############################################################################
|
5 |
# Model: Direct SLU
|
6 |
# Encoder: Pre-trained ASR encoder -> LSTM
|
@@ -11,36 +8,7 @@
|
|
11 |
# Authors: Loren Lugosch, Mirco Ravanelli 2020
|
12 |
# ############################################################################
|
13 |
|
14 |
-
# Seed needs to be set at top of yaml, before objects with parameters are made
|
15 |
-
seed: 4
|
16 |
-
__set_seed: !apply:torch.manual_seed [4]
|
17 |
-
experiment: train-real-only
|
18 |
-
output_folder: results/train-real-only/4
|
19 |
-
save_folder: results/train-real-only/4/save
|
20 |
-
train_log: results/train-real-only/4/train_log.txt
|
21 |
-
|
22 |
-
# Data files
|
23 |
-
data_folder: /localscratch/timers-and-such/
|
24 |
-
# e.g, /localscratch/timers-and-such
|
25 |
-
data_folder_rirs: /localscratch/timers-and-such/
|
26 |
-
train_splits: [train-real]
|
27 |
-
csv_train: results/train-real-only/4/train-type=direct.csv
|
28 |
-
csv_dev_real: results/train-real-only/4/dev-real-type=direct.csv
|
29 |
-
csv_dev_synth: results/train-real-only/4/dev-synth-type=direct.csv
|
30 |
-
csv_test_real: results/train-real-only/4/test-real-type=direct.csv
|
31 |
-
csv_test_synth: results/train-real-only/4/test-synth-type=direct.csv
|
32 |
-
csv_all_real: results/train-real-only/4/all-real-type=direct.csv
|
33 |
-
tokenizer_file: /home/mila/l/lugoschl/code/speechbrain/recipes/timers-and-such/Tokenizer/results/tokenizer_bpe51/51_unigram.model
|
34 |
-
skip_prep: false
|
35 |
-
ckpt_interval_minutes: 15 # save checkpoint every N min
|
36 |
-
test_on_all_real: false
|
37 |
-
|
38 |
-
# Training parameters
|
39 |
-
number_of_epochs: 50
|
40 |
-
batch_size: 16
|
41 |
-
lr: 0.0003
|
42 |
token_type: unigram # ["unigram", "bpe", "char"]
|
43 |
-
sorting: random
|
44 |
|
45 |
# Model parameters
|
46 |
sample_rate: 16000
|
@@ -59,119 +27,114 @@ slu_beam_size: 80
|
|
59 |
eos_threshold: 1.5
|
60 |
temperature: 1.25
|
61 |
|
62 |
-
dataloader_opts:
|
63 |
-
batch_size: 16
|
64 |
-
shuffle: true
|
65 |
-
|
66 |
-
epoch_counter: &id009 !new:speechbrain.utils.epoch_loop.EpochCounter
|
67 |
-
|
68 |
-
limit: 50
|
69 |
-
|
70 |
# Models
|
71 |
asr_model: !apply:speechbrain.pretrained.EncoderDecoderASR.from_hparams
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
slu_enc:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
output_emb:
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
dec:
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
seq_lin:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
env_corrupt:
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
noise_snr_high: 15
|
113 |
|
114 |
modules:
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
123 |
|
124 |
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
beam_searcher: !new:speechbrain.decoders.S2SRNNBeamSearcher
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
|
146 |
opt_class: !name:torch.optim.Adam
|
147 |
-
|
148 |
|
149 |
-
lr_annealing:
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
|
155 |
checkpointer: !new:speechbrain.utils.checkpoints.Checkpointer
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
161 |
augmentation: !new:speechbrain.lobes.augment.TimeDomainSpecAugment
|
162 |
-
|
163 |
-
|
164 |
|
165 |
log_softmax: !new:speechbrain.nnet.activations.Softmax
|
166 |
-
|
167 |
|
168 |
seq_cost: !name:speechbrain.nnet.losses.nll_loss
|
169 |
-
|
170 |
|
171 |
train_logger: !new:speechbrain.utils.train_logger.FileTrainLogger
|
172 |
-
|
173 |
|
174 |
error_rate_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats
|
175 |
|
176 |
cer_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats
|
177 |
-
|
|
|
|
|
|
|
|
|
1 |
# ############################################################################
|
2 |
# Model: Direct SLU
|
3 |
# Encoder: Pre-trained ASR encoder -> LSTM
|
|
|
8 |
# Authors: Loren Lugosch, Mirco Ravanelli 2020
|
9 |
# ############################################################################
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
token_type: unigram # ["unigram", "bpe", "char"]
|
|
|
12 |
|
13 |
# Model parameters
|
14 |
sample_rate: 16000
|
|
|
27 |
eos_threshold: 1.5
|
28 |
temperature: 1.25
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Models
|
31 |
asr_model: !apply:speechbrain.pretrained.EncoderDecoderASR.from_hparams
|
32 |
+
source: speechbrain/asr-crdnn-rnnlm-librispeech
|
33 |
+
run_opts: {"device":"cuda:0"}
|
34 |
+
|
35 |
+
slu_enc: !new:speechbrain.nnet.containers.Sequential
|
36 |
+
input_shape: [null, null, !ref <ASR_encoder_dim>]
|
37 |
+
lstm: !new:speechbrain.nnet.RNN.LSTM
|
38 |
+
input_size: !ref <ASR_encoder_dim>
|
39 |
+
bidirectional: True
|
40 |
+
hidden_size: !ref <encoder_dim>
|
41 |
+
num_layers: 2
|
42 |
+
linear: !new:speechbrain.nnet.linear.Linear
|
43 |
+
input_size: !ref <encoder_dim> * 2
|
44 |
+
n_neurons: !ref <encoder_dim>
|
45 |
+
|
46 |
+
output_emb: !new:speechbrain.nnet.embedding.Embedding
|
47 |
+
num_embeddings: !ref <output_neurons>
|
48 |
+
embedding_dim: !ref <emb_size>
|
49 |
+
|
50 |
+
dec: !new:speechbrain.nnet.RNN.AttentionalRNNDecoder
|
51 |
+
enc_dim: !ref <encoder_dim>
|
52 |
+
input_size: !ref <emb_size>
|
53 |
+
rnn_type: gru
|
54 |
+
attn_type: keyvalue
|
55 |
+
hidden_size: !ref <dec_neurons>
|
56 |
+
attn_dim: 512
|
57 |
+
num_layers: 3
|
58 |
+
scaling: 1.0
|
59 |
+
dropout: 0.0
|
60 |
+
|
61 |
+
seq_lin: !new:speechbrain.nnet.linear.Linear
|
62 |
+
input_size: !ref <dec_neurons>
|
63 |
+
n_neurons: !ref <output_neurons>
|
64 |
+
|
65 |
+
env_corrupt: !new:speechbrain.lobes.augment.EnvCorrupt
|
66 |
+
openrir_folder: !ref <data_folder_rirs>
|
67 |
+
babble_prob: 0.0
|
68 |
+
reverb_prob: 0.0
|
69 |
+
noise_prob: 1.0
|
70 |
+
noise_snr_low: 0
|
71 |
+
noise_snr_high: 15
|
|
|
72 |
|
73 |
modules:
|
74 |
+
slu_enc: !ref <slu_enc>
|
75 |
+
output_emb: !ref <output_emb>
|
76 |
+
dec: !ref <dec>
|
77 |
+
seq_lin: !ref <seq_lin>
|
78 |
+
env_corrupt: !ref <env_corrupt>
|
79 |
+
|
80 |
+
model: !new:torch.nn.ModuleList
|
81 |
+
- [!ref <slu_enc>, !ref <output_emb>,
|
82 |
+
!ref <dec>, !ref <seq_lin>]
|
83 |
+
|
84 |
+
tokenizer: !new:sentencepiece.SentencePieceProcessor
|
85 |
|
86 |
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
87 |
+
collect_in: !ref <save_folder>/TAS_tokenizer
|
88 |
+
loadables:
|
89 |
+
tokenizer: !ref <tokenizer>
|
90 |
+
paths:
|
91 |
+
tokenizer: !ref <tokenizer_file>
|
92 |
|
93 |
beam_searcher: !new:speechbrain.decoders.S2SRNNBeamSearcher
|
94 |
+
embedding: !ref <output_emb>
|
95 |
+
decoder: !ref <dec>
|
96 |
+
linear: !ref <seq_lin>
|
97 |
+
bos_index: !ref <bos_index>
|
98 |
+
eos_index: !ref <eos_index>
|
99 |
+
min_decode_ratio: !ref <min_decode_ratio>
|
100 |
+
max_decode_ratio: !ref <max_decode_ratio>
|
101 |
+
beam_size: !ref <slu_beam_size>
|
102 |
+
eos_threshold: !ref <eos_threshold>
|
103 |
+
temperature: !ref <temperature>
|
104 |
+
using_max_attn_shift: False
|
105 |
+
max_attn_shift: 30
|
106 |
+
coverage_penalty: 0.
|
107 |
|
108 |
opt_class: !name:torch.optim.Adam
|
109 |
+
lr: !ref <lr>
|
110 |
|
111 |
+
lr_annealing: !new:speechbrain.nnet.schedulers.NewBobScheduler
|
112 |
+
initial_value: !ref <lr>
|
113 |
+
improvement_threshold: 0.0025
|
114 |
+
annealing_factor: 0.8
|
115 |
+
patient: 0
|
116 |
|
117 |
checkpointer: !new:speechbrain.utils.checkpoints.Checkpointer
|
118 |
+
checkpoints_dir: !ref <save_folder>
|
119 |
+
recoverables:
|
120 |
+
model: !ref <model>
|
121 |
+
scheduler: !ref <lr_annealing>
|
122 |
+
counter: !ref <epoch_counter>
|
123 |
+
|
124 |
augmentation: !new:speechbrain.lobes.augment.TimeDomainSpecAugment
|
125 |
+
sample_rate: !ref <sample_rate>
|
126 |
+
speeds: [95, 100, 105]
|
127 |
|
128 |
log_softmax: !new:speechbrain.nnet.activations.Softmax
|
129 |
+
apply_log: True
|
130 |
|
131 |
seq_cost: !name:speechbrain.nnet.losses.nll_loss
|
132 |
+
label_smoothing: 0.1
|
133 |
|
134 |
train_logger: !new:speechbrain.utils.train_logger.FileTrainLogger
|
135 |
+
save_file: !ref <train_log>
|
136 |
|
137 |
error_rate_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats
|
138 |
|
139 |
cer_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats
|
140 |
+
split_tokens: True
|