Upload hyperparams.yaml
Browse files- hyperparams.yaml +96 -0
hyperparams.yaml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ################################
|
2 |
+
# Model: wav2vec2 + DNN + CTC/Attention
|
3 |
+
# Augmentation: SpecAugment
|
4 |
+
# Authors: Titouan Parcollet 2021
|
5 |
+
# ################################
|
6 |
+
|
7 |
+
sample_rate: 16000
|
8 |
+
wav2vec2_hub: facebook/wav2vec2-large-xlsr-53
|
9 |
+
|
10 |
+
# BPE parameters
|
11 |
+
token_type: char # ["unigram", "bpe", "char"]
|
12 |
+
character_coverage: 1.0
|
13 |
+
|
14 |
+
# Model parameters
|
15 |
+
activation: !name:torch.nn.LeakyReLU
|
16 |
+
dnn_layers: 2
|
17 |
+
dnn_neurons: 1024
|
18 |
+
emb_size: 128
|
19 |
+
dec_neurons: 1024
|
20 |
+
|
21 |
+
# Outputs
|
22 |
+
output_neurons: 36 # BPE size, index(blank/eos/bos) = 0
|
23 |
+
|
24 |
+
# Decoding parameters
|
25 |
+
# Be sure that the bos and eos index match with the BPEs ones
|
26 |
+
blank_index: 0
|
27 |
+
bos_index: 1
|
28 |
+
eos_index: 2
|
29 |
+
min_decode_ratio: 0.0
|
30 |
+
max_decode_ratio: 1.0
|
31 |
+
beam_size: 80
|
32 |
+
eos_threshold: 1.5
|
33 |
+
using_max_attn_shift: True
|
34 |
+
max_attn_shift: 140
|
35 |
+
ctc_weight_decode: 0.0
|
36 |
+
temperature: 1.50
|
37 |
+
|
38 |
+
enc: !new:speechbrain.nnet.containers.Sequential
|
39 |
+
input_shape: [null, null, 1024]
|
40 |
+
linear1: !name:speechbrain.nnet.linear.Linear
|
41 |
+
n_neurons: 1024
|
42 |
+
bias: True
|
43 |
+
bn1: !name:speechbrain.nnet.normalization.BatchNorm1d
|
44 |
+
activation: !new:torch.nn.LeakyReLU
|
45 |
+
drop: !new:torch.nn.Dropout
|
46 |
+
p: 0.15
|
47 |
+
linear2: !name:speechbrain.nnet.linear.Linear
|
48 |
+
n_neurons: 1024
|
49 |
+
bias: True
|
50 |
+
bn2: !name:speechbrain.nnet.normalization.BatchNorm1d
|
51 |
+
activation2: !new:torch.nn.LeakyReLU
|
52 |
+
drop2: !new:torch.nn.Dropout
|
53 |
+
p: 0.15
|
54 |
+
linear3: !name:speechbrain.nnet.linear.Linear
|
55 |
+
n_neurons: 1024
|
56 |
+
bias: True
|
57 |
+
bn3: !name:speechbrain.nnet.normalization.BatchNorm1d
|
58 |
+
activation3: !new:torch.nn.LeakyReLU
|
59 |
+
|
60 |
+
wav2vec2: !new:speechbrain.lobes.models.huggingface_wav2vec.HuggingFaceWav2Vec2
|
61 |
+
source: !ref <wav2vec2_hub>
|
62 |
+
output_norm: True
|
63 |
+
freeze: True
|
64 |
+
save_path: model_checkpoints
|
65 |
+
|
66 |
+
ctc_lin: !new:speechbrain.nnet.linear.Linear
|
67 |
+
input_size: !ref <dnn_neurons>
|
68 |
+
n_neurons: !ref <output_neurons>
|
69 |
+
|
70 |
+
log_softmax: !new:speechbrain.nnet.activations.Softmax
|
71 |
+
apply_log: True
|
72 |
+
|
73 |
+
ctc_cost: !name:speechbrain.nnet.losses.ctc_loss
|
74 |
+
blank_index: !ref <blank_index>
|
75 |
+
|
76 |
+
asr_model: !new:torch.nn.ModuleList
|
77 |
+
- [!ref <enc>, !ref <ctc_lin>]
|
78 |
+
|
79 |
+
tokenizer: !new:sentencepiece.SentencePieceProcessor
|
80 |
+
|
81 |
+
encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential
|
82 |
+
wav2vec2: !ref <wav2vec2>
|
83 |
+
enc: !ref <enc>
|
84 |
+
ctc_lin: !ref <ctc_lin>
|
85 |
+
|
86 |
+
decoding_function: !name:speechbrain.decoders.ctc_greedy_decode
|
87 |
+
blank_id: !ref <blank_index>
|
88 |
+
|
89 |
+
modules:
|
90 |
+
encoder: !ref <encoder>
|
91 |
+
|
92 |
+
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
93 |
+
loadables:
|
94 |
+
wav2vec2: !ref <wav2vec2>
|
95 |
+
asr: !ref <asr_model>
|
96 |
+
tokenizer: !ref <tokenizer>
|