Sevain commited on
Commit
b03d5f2
·
verified ·
1 Parent(s): 73a3b26

Upload hyperparams.yaml with huggingface_hub

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