Upload train_config.yaml
Browse files- train_config.yaml +138 -0
train_config.yaml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Generated 2023-05-14 from:
|
2 |
+
# /home/agorin/cryceleb2023/hparams/ecapa_voxceleb_basic.yaml
|
3 |
+
# yamllint disable
|
4 |
+
# ################################
|
5 |
+
# Model: Speaker identification with ECAPA for CryCeleb
|
6 |
+
# Authors: David Budaghyan
|
7 |
+
# ################################
|
8 |
+
|
9 |
+
ckpt_interval_minutes: 15 # save checkpoint every N min
|
10 |
+
|
11 |
+
##### SEED
|
12 |
+
seed: 3011
|
13 |
+
__set_seed: !apply:crybrain_config_utils.set_seed [3011]
|
14 |
+
|
15 |
+
# DataLoader
|
16 |
+
bs: 32
|
17 |
+
train_dataloader_options:
|
18 |
+
batch_size: 32
|
19 |
+
shuffle: true
|
20 |
+
val_dataloader_options:
|
21 |
+
batch_size: 2
|
22 |
+
shuffle: false
|
23 |
+
|
24 |
+
##### ESTIMATOR COMPONENTS
|
25 |
+
# Fbank (feature extractor)
|
26 |
+
n_mels: 80
|
27 |
+
left_frames: 0
|
28 |
+
right_frames: 0
|
29 |
+
deltas: false
|
30 |
+
compute_features: &id002 !new:speechbrain.lobes.features.Fbank
|
31 |
+
n_mels: 80
|
32 |
+
left_frames: 0
|
33 |
+
right_frames: 0
|
34 |
+
deltas: false
|
35 |
+
|
36 |
+
# ECAPA
|
37 |
+
emb_dim: 192
|
38 |
+
embedding_model: &id001 !new:speechbrain.lobes.models.ECAPA_TDNN.ECAPA_TDNN
|
39 |
+
input_size: 80
|
40 |
+
channels: [1024, 1024, 1024, 1024, 3072]
|
41 |
+
kernel_sizes: [5, 3, 3, 3, 1]
|
42 |
+
dilations: [1, 2, 3, 4, 1]
|
43 |
+
groups: [1, 1, 1, 1, 1]
|
44 |
+
attention_channels: 128
|
45 |
+
lin_neurons: 192
|
46 |
+
|
47 |
+
# If you do not want to use the pretrained encoder you can simply delete pretrained_encoder field.
|
48 |
+
pretrained_model_name: spkrec-ecapa-voxceleb
|
49 |
+
pretrained_embedding_model_path: speechbrain/spkrec-ecapa-voxceleb/embedding_model.ckpt
|
50 |
+
pretrained_embedding_model: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
51 |
+
collect_in: ./experiments/ecapa_voxceleb_ft_basic/ckpts
|
52 |
+
loadables:
|
53 |
+
model: *id001
|
54 |
+
paths:
|
55 |
+
model: speechbrain/spkrec-ecapa-voxceleb/embedding_model.ckpt
|
56 |
+
|
57 |
+
# CLASSIFIER
|
58 |
+
n_classes: 348
|
59 |
+
# check-yaml disable
|
60 |
+
|
61 |
+
|
62 |
+
classifier: &id003 !new:speechbrain.lobes.models.ECAPA_TDNN.Classifier
|
63 |
+
input_size: 192
|
64 |
+
out_neurons: 348
|
65 |
+
|
66 |
+
##### EPOCH COUNTER
|
67 |
+
n_epochs: 1000
|
68 |
+
epoch_counter: &id005 !new:speechbrain.utils.epoch_loop.EpochCounter
|
69 |
+
limit: 1000
|
70 |
+
|
71 |
+
##### OPTIMIZER
|
72 |
+
start_lr: 0.0001
|
73 |
+
opt_class: !name:torch.optim.Adam
|
74 |
+
lr: 0.0001
|
75 |
+
weight_decay: 0.000002
|
76 |
+
|
77 |
+
##### LEARNING RATE SCHEDULERS
|
78 |
+
lrsched_name: cyclic
|
79 |
+
# one of:
|
80 |
+
# onplateau
|
81 |
+
# cyclic
|
82 |
+
lr_min: 0.0000000001
|
83 |
+
lr_scheduler: &id006 !apply:crybrain_config_utils.choose_lrsched
|
84 |
+
lrsched_name: cyclic
|
85 |
+
#below are kwargs, only the ones relevant to the type of scheduler will be
|
86 |
+
#used for initialization in `choose_lrsched`
|
87 |
+
|
88 |
+
#onplateau (ReduceLROnPlateau)
|
89 |
+
lr_min: 0.0000000001
|
90 |
+
factor: 0.4
|
91 |
+
patience: 10
|
92 |
+
dont_halve_until_epoch: 35
|
93 |
+
#cyclic (CyclicLRScheduler)
|
94 |
+
base_lr: 0.00000001
|
95 |
+
max_lr: 0.0001
|
96 |
+
step_size: 100
|
97 |
+
mode: triangular
|
98 |
+
gamma: 1.0
|
99 |
+
scale_fn:
|
100 |
+
scale_mode: cycle
|
101 |
+
|
102 |
+
sample_rate: 16000
|
103 |
+
mean_var_norm: &id004 !new:speechbrain.processing.features.InputNormalization
|
104 |
+
|
105 |
+
norm_type: sentence
|
106 |
+
std_norm: false
|
107 |
+
|
108 |
+
modules:
|
109 |
+
compute_features: *id002
|
110 |
+
embedding_model: *id001
|
111 |
+
classifier: *id003
|
112 |
+
mean_var_norm: *id004
|
113 |
+
compute_cost: !new:speechbrain.nnet.losses.LogSoftmaxWrapper
|
114 |
+
loss_fn: !new:speechbrain.nnet.losses.AdditiveAngularMargin
|
115 |
+
margin: 0.2
|
116 |
+
scale: 30
|
117 |
+
|
118 |
+
classification_stats: !name:speechbrain.utils.metric_stats.ClassificationStats
|
119 |
+
###################################################################
|
120 |
+
### OUTPUT PATHS ###
|
121 |
+
|
122 |
+
|
123 |
+
experiment_name: ecapa_voxceleb_ft_basic
|
124 |
+
# must run from the directory which contains "experiments"
|
125 |
+
|
126 |
+
|
127 |
+
experiment_dir: ./experiments/ecapa_voxceleb_ft_basic
|
128 |
+
train_logger: !new:speechbrain.utils.train_logger.FileTrainLogger
|
129 |
+
save_file: ./experiments/ecapa_voxceleb_ft_basic/train_log.txt
|
130 |
+
|
131 |
+
checkpointer: !new:speechbrain.utils.checkpoints.Checkpointer
|
132 |
+
checkpoints_dir: ./experiments/ecapa_voxceleb_ft_basic/ckpts
|
133 |
+
recoverables:
|
134 |
+
embedding_model: *id001
|
135 |
+
classifier: *id003
|
136 |
+
normalizer: *id004
|
137 |
+
counter: *id005
|
138 |
+
lr_scheduler: *id006
|