Sevain commited on
Commit
514f484
·
verified ·
1 Parent(s): 00e076e

Upload hyperparams.yaml with huggingface_hub

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