Aku Rouhe commited on
Commit
a70d86e
1 Parent(s): 6cf32dd

hyperparams

Browse files
Files changed (1) hide show
  1. Full-A.yaml +143 -0
Full-A.yaml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ num_units: 1750
2
+ tokenizer: !new:sentencepiece.SentencePieceProcessor
3
+
4
+ # Feature parameters
5
+ sample_rate: 16000
6
+ n_fft: 400
7
+ n_mels: 40
8
+
9
+ # Model parameters
10
+ activation: !name:torch.nn.LeakyReLU
11
+ dropout: 0.15
12
+ cnn_blocks: 2
13
+ cnn_channels: (64, 128)
14
+ inter_layer_pooling_size: (2, 2)
15
+ cnn_kernelsize: (3, 3)
16
+ time_pooling_size: 4
17
+ rnn_class: !name:speechbrain.nnet.RNN.LSTM
18
+ rnn_layers: 3
19
+ rnn_neurons: 512
20
+ rnn_bidirectional: True
21
+ dnn_blocks: 1
22
+ dnn_neurons: 512
23
+ emb_size: 128
24
+ dec_neurons: 512
25
+ dec_layers: 1
26
+ output_neurons: !ref <num_units> #Number of tokens (same as LM)
27
+ blank_index: 0
28
+ bos_index: 0
29
+ eos_index: 0
30
+ unk_index: 0
31
+
32
+ min_decode_ratio: 0.0
33
+ max_decode_ratio: 1.0
34
+ valid_beam_size: 4
35
+ test_beam_size: 12
36
+ eos_threshold: 1.2
37
+ using_max_attn_shift: False
38
+ max_attn_shift: 240
39
+ ctc_weight_decode: 0.0
40
+ coverage_penalty: 3.0
41
+ temperature: 2.0
42
+
43
+ # Feature extraction
44
+ compute_features: !new:speechbrain.lobes.features.Fbank
45
+ sample_rate: !ref <sample_rate>
46
+ n_fft: !ref <n_fft>
47
+ n_mels: !ref <n_mels>
48
+
49
+ # Feature normalization (mean and std)
50
+ normalize: !new:speechbrain.processing.features.InputNormalization
51
+ norm_type: global
52
+
53
+ # The CRDNN model is an encoder that combines CNNs, RNNs, and DNNs.
54
+ encoder: !new:speechbrain.lobes.models.CRDNN.CRDNN
55
+ input_shape: [null, null, !ref <n_mels>]
56
+ activation: !ref <activation>
57
+ dropout: !ref <dropout>
58
+ cnn_blocks: !ref <cnn_blocks>
59
+ cnn_channels: !ref <cnn_channels>
60
+ cnn_kernelsize: !ref <cnn_kernelsize>
61
+ inter_layer_pooling_size: !ref <inter_layer_pooling_size>
62
+ time_pooling: True
63
+ using_2d_pooling: False
64
+ time_pooling_size: !ref <time_pooling_size>
65
+ rnn_class: !ref <rnn_class>
66
+ rnn_layers: !ref <rnn_layers>
67
+ rnn_neurons: !ref <rnn_neurons>
68
+ rnn_bidirectional: !ref <rnn_bidirectional>
69
+ rnn_re_init: True
70
+ dnn_blocks: !ref <dnn_blocks>
71
+ dnn_neurons: !ref <dnn_neurons>
72
+ use_rnnp: False
73
+
74
+ # Embedding (from indexes to an embedding space of dimension emb_size).
75
+ embedding: !new:speechbrain.nnet.embedding.Embedding
76
+ num_embeddings: !ref <output_neurons>
77
+ embedding_dim: !ref <emb_size>
78
+
79
+ # Attention-based RNN decoder.
80
+ decoder: !new:speechbrain.nnet.RNN.AttentionalRNNDecoder
81
+ enc_dim: !ref <dnn_neurons>
82
+ input_size: !ref <emb_size>
83
+ rnn_type: gru
84
+ attn_type: location
85
+ hidden_size: !ref <dec_neurons>
86
+ attn_dim: 1024
87
+ num_layers: !ref <dec_layers>
88
+ scaling: 1.0
89
+ channels: 10
90
+ kernel_size: 100
91
+ re_init: True
92
+ dropout: !ref <dropout>
93
+
94
+ # Linear transformation on the top of the decoder.
95
+ seq_lin: !new:speechbrain.nnet.linear.Linear
96
+ input_size: !ref <dec_neurons>
97
+ n_neurons: !ref <output_neurons>
98
+
99
+ # Final softmax (for log posteriors computation).
100
+ log_softmax: !new:speechbrain.nnet.activations.Softmax
101
+ apply_log: True
102
+
103
+
104
+ # Gathering all the submodels in a single model object.
105
+ model: !new:torch.nn.ModuleList
106
+ - - !ref <encoder>
107
+ - !ref <embedding>
108
+ - !ref <decoder>
109
+ - !ref <ctc_lin>
110
+ - !ref <seq_lin>
111
+
112
+ test_search: !new:speechbrain.decoders.S2SRNNBeamSearcher
113
+ embedding: !ref <embedding>
114
+ decoder: !ref <decoder>
115
+ linear: !ref <seq_lin>
116
+ bos_index: !ref <bos_index>
117
+ eos_index: !ref <eos_index>
118
+ blank_index: !ref <blank_index>
119
+ min_decode_ratio: !ref <min_decode_ratio>
120
+ max_decode_ratio: !ref <max_decode_ratio>
121
+ beam_size: !ref <test_beam_size>
122
+ eos_threshold: !ref <eos_threshold>
123
+ using_max_attn_shift: !ref <using_max_attn_shift>
124
+ max_attn_shift: !ref <max_attn_shift>
125
+ coverage_penalty: !ref <coverage_penalty>
126
+ ctc_weight: !ref <ctc_weight_decode>
127
+ temperature: !ref <temperature>
128
+
129
+ # Objects in "modules" dict will have their parameters moved to the correct
130
+ # device, as well as having train()/eval() called on them by the Brain class
131
+ modules:
132
+ encoder: !ref <encoder>
133
+ embedding: !ref <embedding>
134
+ dec: !ref <decoder>
135
+ decoder: !ref <test_search>
136
+ seq_lin: !ref <seq_lin>
137
+ normalize: !ref <normalize>
138
+
139
+ pretrainer !new:speechbrain.utils.parameter_transfer
140
+ loadables:
141
+ model: !ref <model>
142
+ normalizer: !ref <normalize>
143
+ tokenizer: !ref <tokenizer>