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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# pytorch_lightning==1.8.0
|
2 |
+
seed_everything: 123
|
3 |
+
trainer:
|
4 |
+
logger:
|
5 |
+
- class_path: pytorch_lightning.loggers.TensorBoardLogger
|
6 |
+
init_args:
|
7 |
+
save_dir: lightning_logs
|
8 |
+
name: tmp
|
9 |
+
version: null
|
10 |
+
log_graph: false
|
11 |
+
default_hp_metric: true
|
12 |
+
prefix: ''
|
13 |
+
sub_dir: null
|
14 |
+
comment: ''
|
15 |
+
purge_step: null
|
16 |
+
max_queue: 10
|
17 |
+
flush_secs: 120
|
18 |
+
filename_suffix: ''
|
19 |
+
- class_path: pytorch_lightning.loggers.WandbLogger
|
20 |
+
init_args:
|
21 |
+
name: null
|
22 |
+
save_dir: .
|
23 |
+
version: null
|
24 |
+
offline: false
|
25 |
+
dir: null
|
26 |
+
id: null
|
27 |
+
anonymous: null
|
28 |
+
project: tmp
|
29 |
+
log_model: false
|
30 |
+
experiment: null
|
31 |
+
prefix: ''
|
32 |
+
job_type: null
|
33 |
+
config: null
|
34 |
+
entity: null
|
35 |
+
reinit: null
|
36 |
+
tags: null
|
37 |
+
group: null
|
38 |
+
notes: null
|
39 |
+
magic: null
|
40 |
+
config_exclude_keys: null
|
41 |
+
config_include_keys: null
|
42 |
+
mode: null
|
43 |
+
allow_val_change: null
|
44 |
+
resume: null
|
45 |
+
force: null
|
46 |
+
tensorboard: null
|
47 |
+
sync_tensorboard: null
|
48 |
+
monitor_gym: null
|
49 |
+
save_code: null
|
50 |
+
settings: null
|
51 |
+
enable_checkpointing: true
|
52 |
+
callbacks:
|
53 |
+
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
|
54 |
+
init_args:
|
55 |
+
dirpath: null
|
56 |
+
filename: best-val-loss-{epoch}-{step}
|
57 |
+
monitor: loss/loss/val
|
58 |
+
verbose: false
|
59 |
+
save_last: null
|
60 |
+
save_top_k: 1
|
61 |
+
save_weights_only: false
|
62 |
+
mode: min
|
63 |
+
auto_insert_metric_name: true
|
64 |
+
every_n_train_steps: null
|
65 |
+
train_time_interval: null
|
66 |
+
every_n_epochs: null
|
67 |
+
save_on_train_epoch_end: null
|
68 |
+
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
|
69 |
+
init_args:
|
70 |
+
dirpath: null
|
71 |
+
filename: best-eer-loss-{epoch}-{step}
|
72 |
+
monitor: EER evaluation proj/val
|
73 |
+
verbose: false
|
74 |
+
save_last: null
|
75 |
+
save_top_k: 1
|
76 |
+
save_weights_only: false
|
77 |
+
mode: min
|
78 |
+
auto_insert_metric_name: true
|
79 |
+
every_n_train_steps: null
|
80 |
+
train_time_interval: null
|
81 |
+
every_n_epochs: null
|
82 |
+
save_on_train_epoch_end: null
|
83 |
+
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
|
84 |
+
init_args:
|
85 |
+
dirpath: null
|
86 |
+
filename: best-invar-val-{epoch}-{step}
|
87 |
+
monitor: loss/invariance/val
|
88 |
+
verbose: false
|
89 |
+
save_last: null
|
90 |
+
save_top_k: 1
|
91 |
+
save_weights_only: false
|
92 |
+
mode: min
|
93 |
+
auto_insert_metric_name: true
|
94 |
+
every_n_train_steps: null
|
95 |
+
train_time_interval: null
|
96 |
+
every_n_epochs: null
|
97 |
+
save_on_train_epoch_end: null
|
98 |
+
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
|
99 |
+
init_args:
|
100 |
+
dirpath: null
|
101 |
+
filename: best-order-val-{epoch}-{step}
|
102 |
+
monitor: Order evaluation mean proj/val
|
103 |
+
verbose: false
|
104 |
+
save_last: null
|
105 |
+
save_top_k: 1
|
106 |
+
save_weights_only: false
|
107 |
+
mode: min
|
108 |
+
auto_insert_metric_name: true
|
109 |
+
every_n_train_steps: null
|
110 |
+
train_time_interval: null
|
111 |
+
every_n_epochs: null
|
112 |
+
save_on_train_epoch_end: null
|
113 |
+
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
|
114 |
+
init_args:
|
115 |
+
dirpath: null
|
116 |
+
filename: cptk-{epoch}-{step}
|
117 |
+
monitor: null
|
118 |
+
verbose: false
|
119 |
+
save_last: null
|
120 |
+
save_top_k: -1
|
121 |
+
save_weights_only: false
|
122 |
+
mode: min
|
123 |
+
auto_insert_metric_name: true
|
124 |
+
every_n_train_steps: null
|
125 |
+
train_time_interval: null
|
126 |
+
every_n_epochs: 50
|
127 |
+
save_on_train_epoch_end: null
|
128 |
+
- class_path: pytorch_lightning.callbacks.RichProgressBar
|
129 |
+
init_args:
|
130 |
+
refresh_rate: 1
|
131 |
+
leave: false
|
132 |
+
theme:
|
133 |
+
description: white
|
134 |
+
progress_bar: '#6206E0'
|
135 |
+
progress_bar_finished: '#6206E0'
|
136 |
+
progress_bar_pulse: '#6206E0'
|
137 |
+
batch_progress: white
|
138 |
+
time: grey54
|
139 |
+
processing_speed: grey70
|
140 |
+
metrics: white
|
141 |
+
console_kwargs: null
|
142 |
+
- class_path: callbacks.hypersphere.HypersphereEvaluation
|
143 |
+
init_args:
|
144 |
+
normalize: true
|
145 |
+
use_projections: false
|
146 |
+
- class_path: callbacks.hypersphere.HypersphereEvaluation
|
147 |
+
init_args:
|
148 |
+
normalize: true
|
149 |
+
use_projections: true
|
150 |
+
- class_path: callbacks.lr_logger.LearningRateLogger
|
151 |
+
- class_path: bernardo.callbacks.evaluation.OrderEvaluation
|
152 |
+
init_args:
|
153 |
+
log_n_epochs: 5
|
154 |
+
on_train: true
|
155 |
+
use_projection: true
|
156 |
+
- class_path: bernardo.callbacks.evaluation.EEREvaluation
|
157 |
+
init_args:
|
158 |
+
use_more_neg: false
|
159 |
+
log_n_epochs: 5
|
160 |
+
on_train: false
|
161 |
+
use_projection: true
|
162 |
+
default_root_dir: null
|
163 |
+
gradient_clip_val: null
|
164 |
+
gradient_clip_algorithm: null
|
165 |
+
num_nodes: 1
|
166 |
+
num_processes: null
|
167 |
+
devices:
|
168 |
+
- 1
|
169 |
+
gpus: null
|
170 |
+
auto_select_gpus: false
|
171 |
+
tpu_cores: null
|
172 |
+
ipus: null
|
173 |
+
enable_progress_bar: true
|
174 |
+
overfit_batches: 0.0
|
175 |
+
track_grad_norm: -1
|
176 |
+
check_val_every_n_epoch: 1
|
177 |
+
fast_dev_run: false
|
178 |
+
accumulate_grad_batches: null
|
179 |
+
max_epochs: 500
|
180 |
+
min_epochs: null
|
181 |
+
max_steps: -1
|
182 |
+
min_steps: null
|
183 |
+
max_time: null
|
184 |
+
limit_train_batches: null
|
185 |
+
limit_val_batches: null
|
186 |
+
limit_test_batches: null
|
187 |
+
limit_predict_batches: null
|
188 |
+
val_check_interval: null
|
189 |
+
log_every_n_steps: 50
|
190 |
+
accelerator: gpu
|
191 |
+
strategy: null
|
192 |
+
sync_batchnorm: false
|
193 |
+
precision: 32
|
194 |
+
enable_model_summary: true
|
195 |
+
num_sanity_val_steps: 2
|
196 |
+
resume_from_checkpoint: null
|
197 |
+
profiler: null
|
198 |
+
benchmark: null
|
199 |
+
deterministic: null
|
200 |
+
reload_dataloaders_every_n_epochs: 0
|
201 |
+
auto_lr_find: false
|
202 |
+
replace_sampler_ddp: true
|
203 |
+
detect_anomaly: false
|
204 |
+
auto_scale_batch_size: false
|
205 |
+
plugins: null
|
206 |
+
amp_backend: native
|
207 |
+
amp_level: null
|
208 |
+
move_metrics_to_cpu: false
|
209 |
+
multiple_trainloader_mode: max_size_cycle
|
210 |
+
inference_mode: true
|
211 |
+
ckpt_path: null
|
212 |
+
model:
|
213 |
+
class_path: models.byol.BYOL
|
214 |
+
init_args:
|
215 |
+
module:
|
216 |
+
class_path: networks.my_siamese_arm.SiameseArm
|
217 |
+
init_args:
|
218 |
+
encoder:
|
219 |
+
class_path: bernardo.models.model.Encoder
|
220 |
+
init_args:
|
221 |
+
backbone: efficientnet_b0
|
222 |
+
feature_extractor:
|
223 |
+
class_path: bernardo.models.model.FeatureExtractor
|
224 |
+
init_args:
|
225 |
+
spec_layer: melspectogram
|
226 |
+
n_fft: 2048
|
227 |
+
hop_length: 512
|
228 |
+
embedding_dim: 1000
|
229 |
+
pretrained: true
|
230 |
+
progress: true
|
231 |
+
stochastic_depth_prob: 0.2
|
232 |
+
norm_layer: null
|
233 |
+
projector:
|
234 |
+
class_path: bernardo.models.model.Projection
|
235 |
+
init_args:
|
236 |
+
input_dim: 1000
|
237 |
+
output_dim: 128
|
238 |
+
nonlinearity: null
|
239 |
+
is_identity: false
|
240 |
+
l2_normalize: true
|
241 |
+
predictor:
|
242 |
+
class_path: networks.mlp.MLP
|
243 |
+
init_args:
|
244 |
+
dims:
|
245 |
+
- 128
|
246 |
+
- 1024
|
247 |
+
- 128
|
248 |
+
activation: true
|
249 |
+
use_batchnorm: true
|
250 |
+
batchnorm_fn: null
|
251 |
+
last_layer: null
|
252 |
+
bias: null
|
253 |
+
layer_init: null
|
254 |
+
normalize_representations: false
|
255 |
+
normalize_projections: true
|
256 |
+
loss_fn:
|
257 |
+
class_path: torch.nn.MSELoss
|
258 |
+
init_args:
|
259 |
+
size_average: null
|
260 |
+
reduce: null
|
261 |
+
reduction: mean
|
262 |
+
weight_callback:
|
263 |
+
class_path: callbacks.ma_updates.MAWeightUpdate
|
264 |
+
init_args:
|
265 |
+
initial_tau: 0.99
|
266 |
+
max_epochs: 1000
|
267 |
+
should_update: true
|
268 |
+
optimizer:
|
269 |
+
class_path: utils.optim.Adam
|
270 |
+
init_args:
|
271 |
+
lr: 3.0e-05
|
272 |
+
betas:
|
273 |
+
- 0.9
|
274 |
+
- 0.999
|
275 |
+
eps: 1.0e-08
|
276 |
+
weight_decay: 1.5e-06
|
277 |
+
amsgrad: false
|
278 |
+
scheduler:
|
279 |
+
class_path: utils.optim.LinearWarmupCosineAnnealing
|
280 |
+
init_args:
|
281 |
+
warmup_epochs: 10
|
282 |
+
max_epochs: 1000
|
283 |
+
warmup_start_lr: 0.0
|
284 |
+
eta_min: 0.0
|
285 |
+
last_epoch: -1
|
286 |
+
data:
|
287 |
+
class_path: bernardo.data.vocals.VocalsDataModule
|
288 |
+
init_args:
|
289 |
+
augs_neg:
|
290 |
+
enable: false
|
291 |
+
gaussian_noise: 0.5
|
292 |
+
pitch_shift_naive: 0
|
293 |
+
time_stretch: 0
|
294 |
+
gain: 0.5
|
295 |
+
shift: 0
|
296 |
+
parametric_eq: 0
|
297 |
+
tanh_distortion: 0
|
298 |
+
time_mask: 0
|
299 |
+
formant_shift_parselmouth: 0
|
300 |
+
pitch_shift_parselmouth: 0
|
301 |
+
pitch_range_parselmouth: 0
|
302 |
+
pitch_shift_parselmouth_prob: 0
|
303 |
+
positive_examples: same_clip
|
304 |
+
dataset_dirs:
|
305 |
+
- tencys_vocals
|
306 |
+
- ghero_vocals_3
|
307 |
+
- ghero_vocals_4
|
308 |
+
batch_size: 120
|
309 |
+
batch_size_val: 120
|
310 |
+
nr_samples: 176000
|
311 |
+
normalize: true
|
312 |
+
num_workers: 40
|
313 |
+
sr: 44100
|
314 |
+
batch_sampling_mode: sample_clips
|
315 |
+
eval_frac: 0.105
|
316 |
+
group_name_is_folder: true
|
317 |
+
group_by_artist: true
|
318 |
+
augs:
|
319 |
+
enable: true
|
320 |
+
gaussian_noise: 0.5
|
321 |
+
pitch_shift_naive: 0
|
322 |
+
time_stretch: 0
|
323 |
+
gain: 0.5
|
324 |
+
shift: 0
|
325 |
+
parametric_eq: 0
|
326 |
+
tanh_distortion: 0
|
327 |
+
time_mask: 0.5
|
328 |
+
formant_shift_parselmouth: 0
|
329 |
+
pitch_shift_parselmouth:
|
330 |
+
- 1
|
331 |
+
- 1.4
|
332 |
+
pitch_range_parselmouth: 1.5
|
333 |
+
pitch_shift_parselmouth_prob: 0.5
|
334 |
+
transform_override: false
|
335 |
+
verbose: true
|
336 |
+
use_random_loader: false
|
337 |
+
max_groups: -1
|
338 |
+
multi_epoch: 1
|
339 |
+
classification: false
|
byol/hyperparams.yaml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
encoder:
|
2 |
+
backbone: efficientnet_b0
|
3 |
+
embedding_dim: 1000
|
4 |
+
pretrained: false
|
5 |
+
feature_extractor:
|
6 |
+
hop_length: 512
|
7 |
+
n_fft: 2048
|
8 |
+
spec_layer: melspectogram
|
byol/model.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:509f96f23a1076325f4164fa4176fa282e709da203d30b109fa05b1b6cb3c978
|
3 |
+
size 38765343
|