├── .gitignore ├── README.md ├── SemiSupCon ├── dataloading │ ├── __init__.py │ ├── custom_augmentations │ │ ├── __init__.py │ │ ├── bitcrush.py │ │ ├── chorus.py │ │ ├── compression.py │ │ ├── delay.py │ │ ├── distortion.py │ │ ├── mp3.py │ │ ├── pedalboard_audiomentation.py │ │ ├── reverb.py │ │ ├── reverse.py │ │ └── time_stretch.py │ ├── datamodule_splitter.py │ ├── datamodules.py │ ├── mixed_dataloader.py │ ├── pretraining_datasets │ │ ├── sl_dataset.py │ │ └── ssl_dataset.py │ └── utils │ │ └── loading_utils.py ├── models │ ├── encoders │ │ ├── samplecnn.py │ │ ├── samplecnn_xl.py │ │ └── tune.py │ ├── finetuning.py │ ├── losses │ │ └── semisupconloss.py │ ├── semisupcon.py │ ├── task_metrics.py │ └── utils.py └── viz │ ├── .gitkeep │ └── dimension_reduction.py ├── case_study.ipynb ├── config ├── .gitkeep ├── finetuning │ ├── cross-dataset │ │ ├── finetune_emomusic.yaml │ │ ├── finetune_giantsteps.yaml │ │ ├── finetune_gtzan.yaml │ │ ├── finetune_medleydb.yaml │ │ ├── finetune_mtat_all.yaml │ │ ├── finetune_mtat_top50.yaml │ │ ├── finetune_mtg_genre.yaml │ │ ├── finetune_mtg_instr.yaml │ │ ├── finetune_mtg_mood.yaml │ │ ├── finetune_mtg_top50.yaml │ │ ├── finetune_nsynth_instr_family.yaml │ │ ├── finetune_nsynth_pitch.yaml │ │ ├── finetune_vocalset_singer.yaml │ │ └── finetune_vocalset_technique.yaml │ ├── from_scratch │ │ └── train_MTAT.yaml │ ├── main_results │ │ ├── finetune_MTAT.yaml │ │ └── finetune_MTAT_tuneplus.yaml │ └── severity_experiments │ │ ├── new_augmentations │ │ ├── only │ │ │ ├── bitcrush.yaml │ │ │ ├── chorus.yaml │ │ │ ├── compression.yaml │ │ │ ├── distortion.yaml │ │ │ ├── mp3.yaml │ │ │ ├── reverb.yaml │ │ │ ├── reverse.yaml │ │ │ ├── splice.yaml │ │ │ └── stretch.yaml │ │ ├── tier2_only │ │ │ ├── tier2bitcrush.yaml │ │ │ ├── tier2chorus.yaml │ │ │ ├── tier2compression.yaml │ │ │ ├── tier2distortion.yaml │ │ │ ├── tier2mp3.yaml │ │ │ ├── tier2reverb.yaml │ │ │ ├── tier2reverse.yaml │ │ │ ├── tier2splice.yaml │ │ │ └── tier2stretch.yaml │ │ └── with │ │ │ ├── Tier 10.yaml │ │ │ ├── Tier 5.yaml │ │ │ ├── Tier 6.yaml │ │ │ ├── Tier 7.yaml │ │ │ ├── Tier 8.yaml │ │ │ └── Tier 9.yaml │ │ ├── severity=0.yaml │ │ ├── severity=1.yaml │ │ ├── severity=2.yaml │ │ ├── severity=3.yaml │ │ └── severity=4.yaml └── pretraining │ ├── experiments │ ├── augmentations │ │ ├── sl │ │ │ ├── M=16.yaml │ │ │ ├── M=2.yaml │ │ │ ├── M=32.yaml │ │ │ ├── M=4.yaml │ │ │ └── M=8.yaml │ │ ├── smsl │ │ │ ├── M=16.yaml │ │ │ ├── M=2.yaml │ │ │ ├── M=32.yaml │ │ │ ├── M=4.yaml │ │ │ └── M=8.yaml │ │ └── ssl │ │ │ ├── M=16.yaml │ │ │ ├── M=2.yaml │ │ │ ├── M=32.yaml │ │ │ ├── M=4.yaml │ │ │ └── M=8.yaml │ ├── cross-dataset │ │ └── smsl.yaml │ ├── ps_bs │ │ ├── bs │ │ │ ├── bs=005.yaml │ │ │ ├── bs=01.yaml │ │ │ ├── bs=025.yaml │ │ │ ├── bs=05.yaml │ │ │ └── bs=075.yaml │ │ └── ps │ │ │ ├── ps=005.yaml │ │ │ ├── ps=01.yaml │ │ │ ├── ps=025.yaml │ │ │ ├── ps=05.yaml │ │ │ └── ps=075.yaml │ └── threshold │ │ ├── sl │ │ ├── sl_T=1.yaml │ │ ├── sl_T=2.yaml │ │ ├── sl_T=4.yaml │ │ ├── sl_T=6.yaml │ │ └── sl_T=weight.yaml │ │ └── smsl │ │ ├── smsl_T=2.yaml │ │ ├── smsl_T=4.yaml │ │ ├── smsl_T=6.yaml │ │ └── smsl_T=weight.yaml │ ├── model_configs │ ├── samplecnn_config.yaml │ └── tune_config.yaml │ ├── pretrain_sl.yaml │ ├── pretrain_smsl.yaml │ ├── pretrain_smsl_tuneplus.yaml │ └── pretrain_ssl.yaml ├── data ├── .gitkeep └── gtzan │ ├── test_filtered.txt │ ├── train_filtered.txt │ └── val_filtered.txt ├── finetune.py ├── media └── SMSL_Horizontal.png ├── pretrain.py ├── scripts ├── .gitkeep └── purge_wandb.py ├── test.py └── zero_shot_eval.py /SemiSupCon/dataloading/__init__.py: -------------------------------------------------------------------------------- 1 | from .pretraining_datasets.sl_dataset import SupervisedDataset, SupervisedTestDataset 2 | from .pretraining_datasets.ssl_dataset import SelfSupervisedDataset 3 | from .mixed_dataloader import MixedDataLoader 4 | from .datamodule_splitter import DataModuleSplitter -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/__init__.py: -------------------------------------------------------------------------------- 1 | from .delay import Delay 2 | from .time_stretch import TimeStretchAudiomentation 3 | from .chorus import ChorusAudiomentation 4 | from .compression import CompressorAudiomentation 5 | from .distortion import DistortionAudiomentation 6 | from .mp3 import MP3CompressorAudiomentation 7 | from .reverb import ReverbAudiomentation 8 | from .reverse import Reverse 9 | from .bitcrush import BitcrushAudiomentation 10 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/bitcrush.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, Bitcrush 4 | 5 | 6 | 7 | class BitcrushAudiomentation(PedalBoardAudiomentation): 8 | 9 | def __init__(self, board=None, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 10 | 11 | board = Pedalboard([ 12 | Bitcrush(**kwargs) 13 | ]) 14 | 15 | super().__init__(board, mode, p, p_mode, sample_rate, output_type) 16 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/chorus.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, Chorus 4 | 5 | 6 | class ChorusAudiomentation(PedalBoardAudiomentation): 7 | 8 | def __init__(self, board=None, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 9 | 10 | board = Pedalboard([ 11 | Chorus(**kwargs) 12 | ]) 13 | 14 | super().__init__(board, mode, p, p_mode, sample_rate, output_type) 15 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/compression.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, Compressor 4 | 5 | 6 | class CompressorAudiomentation(PedalBoardAudiomentation): 7 | 8 | 9 | 10 | def __init__(self, board=None, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 11 | 12 | 13 | board = Pedalboard([ 14 | Compressor(**kwargs) 15 | ]) 16 | 17 | super().__init__(board, mode, p, p_mode, sample_rate, output_type) 18 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/distortion.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, Distortion 4 | 5 | 6 | class DistortionAudiomentation(PedalBoardAudiomentation): 7 | 8 | def __init__(self, board=None, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 9 | 10 | 11 | board = Pedalboard([ 12 | Distortion(**kwargs) 13 | ]) 14 | 15 | super().__init__(board, mode, p, p_mode, sample_rate, output_type) 16 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/mp3.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, MP3Compressor 4 | 5 | 6 | 7 | class MP3CompressorAudiomentation(PedalBoardAudiomentation): 8 | 9 | def __init__(self, board=None, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 10 | 11 | board = Pedalboard([ 12 | MP3Compressor(**kwargs) 13 | ]) 14 | 15 | super().__init__(board, mode, p, p_mode, sample_rate, output_type) 16 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/pedalboard_audiomentation.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | from typing import Optional 4 | import torch 5 | from torch_audiomentations.core.transforms_interface import BaseWaveformTransform 6 | from torch_audiomentations.utils.object_dict import ObjectDict 7 | from torch import Tensor 8 | 9 | 10 | 11 | class PedalBoardAudiomentation(BaseWaveformTransform): 12 | """ 13 | A wrapper for pedalboard, a python package for audio effects. 14 | Callable, and can be used as a torch transform. 15 | """ 16 | 17 | 18 | supported_modes = {"per_example"} 19 | 20 | supports_multichannel = True 21 | requires_sample_rate = True 22 | 23 | supports_target = True 24 | requires_target = False 25 | 26 | 27 | def __init__(self, board, 28 | mode: str = "per_example", 29 | p: float = 0.5, 30 | p_mode: str = None, 31 | sample_rate: int = None, 32 | target_rate: int = None, 33 | output_type: Optional[str] = None,): 34 | super().__init__( 35 | mode=mode, 36 | p=p, 37 | p_mode=p_mode, 38 | sample_rate=sample_rate, 39 | target_rate=target_rate, 40 | output_type=output_type, 41 | ) 42 | """ 43 | :param board: Pedalboard object: Pedalboard object to be used for audio processing 44 | :param sample_rate: 45 | :param mode: ``per_example``, ``per_channel``, or ``per_batch``. Default ``per_example``. 46 | :param p: 47 | :param p_mode: 48 | :param target_rate: 49 | 50 | """ 51 | 52 | if self.mode not in self.supported_modes: 53 | raise ValueError( 54 | f"Invalid mode: {self.mode}. Supported modes are: {self.supported_modes}" 55 | ) 56 | 57 | self._board = board 58 | self._sample_rate = sample_rate 59 | self._mode = mode 60 | self._p = p 61 | 62 | # indexing with [] should return self._board[index] 63 | def __getitem__(self, index): 64 | return self._board[index] 65 | 66 | def append(self, effect): 67 | self._board.append(effect) 68 | 69 | # def __call__(self, samples): 70 | # return self.process(samples) 71 | 72 | def process(self, samples): 73 | ## audio is of shape [Batch, channels, time], as expected by pedalboard 74 | if self._mode == 'per_example': 75 | new_audio = [] 76 | for i in range(samples.shape[0]): 77 | input_ = samples[i,:,:].numpy() 78 | effected = self._board(input_array = input_, sample_rate = self._sample_rate) 79 | new_audio.append(torch.tensor(effected).unsqueeze(0)) 80 | 81 | 82 | return torch.cat(new_audio, dim=0) 83 | 84 | def apply_transform( 85 | 86 | self, 87 | samples: Tensor = None, 88 | sample_rate: Optional[int] = None, 89 | targets: Optional[Tensor] = None, 90 | target_rate: Optional[int] = None, 91 | ) -> ObjectDict: 92 | samples = self.process(samples) 93 | 94 | return ObjectDict( 95 | samples=samples, 96 | sample_rate=sample_rate, 97 | targets=targets, 98 | target_rate=target_rate, 99 | ) 100 | 101 | # TODO : implement parameter randomization 102 | # TODO : implement per-batch and per-channel modes -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/reverb.py: -------------------------------------------------------------------------------- 1 | 2 | from .pedalboard_audiomentation import PedalBoardAudiomentation 3 | from pedalboard import Pedalboard, Reverb 4 | 5 | 6 | class ReverbAudiomentation(PedalBoardAudiomentation): 7 | 8 | def __init__(self, sample_rate = 22050, mode='per_example', p=0.5, p_mode=None, output_type=None, *args, **kwargs): 9 | board = Pedalboard([ 10 | Reverb(**kwargs) 11 | ]) 12 | super().__init__(board = board, mode = mode, p = p, p_mode = p_mode, sample_rate = sample_rate, output_type = None) 13 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/custom_augmentations/reverse.py: -------------------------------------------------------------------------------- 1 | 2 | from torch_audiomentations.core.transforms_interface import BaseWaveformTransform 3 | from torch_audiomentations.utils.object_dict import ObjectDict 4 | 5 | from torch import Tensor 6 | from typing import Optional 7 | import librosa 8 | import numpy as np 9 | import torch 10 | 11 | 12 | 13 | class Reverse(BaseWaveformTransform): 14 | 15 | supported_modes = {"per_batch", "per_example", "per_channel"} 16 | 17 | supports_multichannel = True 18 | requires_sample_rate = False 19 | 20 | supports_target = True 21 | requires_target = False 22 | 23 | def __init__( 24 | self, 25 | mode: str = "per_example", 26 | p: float = 0.5, 27 | p_mode: str = None, 28 | sample_rate: int = None, 29 | target_rate: int = None, 30 | output_type: Optional[str] = None, 31 | ): 32 | super().__init__( 33 | mode=mode, 34 | p=p, 35 | p_mode=p_mode, 36 | sample_rate=sample_rate, 37 | target_rate=target_rate, 38 | output_type=output_type, 39 | ) 40 | 41 | self._sample_rate = sample_rate 42 | self._mode = mode 43 | 44 | def randomize_parameters( 45 | self, 46 | samples: Tensor = None, 47 | sample_rate: Optional[int] = None, 48 | targets: Optional[Tensor] = None, 49 | target_rate: Optional[int] = None, 50 | ): 51 | """ 52 | :param samples: (batch_size, num_channels, num_samples) 53 | :param sample_rate: 54 | """ 55 | batch_size, num_channels, num_samples = samples.shape 56 | 57 | 58 | def apply_transform( 59 | 60 | self, 61 | samples: Tensor = None, 62 | sample_rate: Optional[int] = None, 63 | targets: Optional[Tensor] = None, 64 | target_rate: Optional[int] = None, 65 | ) -> ObjectDict: 66 | """ 67 | :param samples: (batch_size, num_channels, num_samples) 68 | :param sample_rate: 69 | """ 70 | batch_size, num_channels, num_samples = samples.shape 71 | 72 | 73 | if self._mode == "per_example": 74 | for i in range(batch_size): 75 | samples[i, ...] = self.reverse( 76 | samples[i][None], 77 | sample_rate, 78 | )[0] 79 | 80 | 81 | elif self._mode == "per_batch": 82 | samples = self.reverse( 83 | samples, 84 | sample_rate 85 | ) 86 | 87 | return ObjectDict( 88 | samples=samples, 89 | sample_rate=sample_rate, 90 | targets=targets, 91 | target_rate=target_rate, 92 | ) 93 | 94 | def reverse(self,samples: Tensor,sr = 22050) -> Tensor: 95 | 96 | return torch.flip(samples,[-1]) 97 | 98 | -------------------------------------------------------------------------------- /SemiSupCon/dataloading/pretraining_datasets/ssl_dataset.py: -------------------------------------------------------------------------------- 1 | from torch.utils.data import Dataset 2 | import torch 3 | import os 4 | from SemiSupCon.dataloading.utils.loading_utils import load_full_audio, load_random_audio_chunk 5 | import numpy as np 6 | 7 | 8 | 9 | class SelfSupervisedDataset(Dataset): 10 | 11 | def __init__(self, data_dir, annotations = None, target_length = 2.7, target_sample_rate = 22050, n_augmentations= 2, transform = True, augmentations = None, train = True, n_classes = 50) -> None: 12 | 13 | self.data_dir = data_dir 14 | self.target_length = target_length 15 | self.target_sample_rate = target_sample_rate 16 | self.n_augmentations = n_augmentations 17 | self.target_samples = int(self.target_length * self.target_sample_rate) 18 | self.global_target_samples = self.target_samples * self.n_augmentations 19 | self.train = train 20 | self.n_classes = n_classes 21 | self.transform = transform 22 | self.augmentations = augmentations 23 | self.allow_overlapping = False 24 | 25 | self.annotations = annotations 26 | 27 | def __len__(self): 28 | return len(self.annotations) 29 | 30 | def __getitem__(self, index): 31 | 32 | path = os.path.join(self.data_dir, self.annotations.iloc[index]['file_path']) 33 | if self.allow_overlapping == False: 34 | audio = load_random_audio_chunk(path, self.global_target_samples, self.target_sample_rate, n_augmentations=self.n_augmentations) 35 | else: 36 | audio = load_full_audio(path, self.target_samples, self.target_sample_rate) 37 | 38 | if audio is None: 39 | return self[index + 1] 40 | 41 | audio, clean_audio = self.split_and_augment(audio) 42 | 43 | labeled = torch.tensor(0) 44 | labels = torch.zeros(self.n_classes) 45 | 46 | #add n_augmentation dimension as the first dimension 47 | labels = labels.unsqueeze(0).repeat(self.n_augmentations,1) 48 | labeled = labeled.unsqueeze(0).repeat(self.n_augmentations) 49 | 50 | return { 51 | "audio": audio, 52 | "clean_audio": clean_audio, 53 | "labels": labels, 54 | "labeled": labeled 55 | } 56 | 57 | def split_and_augment(self,audio): 58 | 59 | if self.allow_overlapping == False: 60 | 61 | waveform = torch.cat(torch.split( 62 | audio, self.target_samples, dim=1)).unsqueeze(1) 63 | 64 | else: 65 | # sample N_augmentations random target_samples samples from the audio 66 | for i in range(self.n_augmentations): 67 | start_idx = np.random.randint(low=0, high=audio.shape[1] - self.target_samples) 68 | waveform = audio[:,start_idx:start_idx + self.target_samples].unsqueeze(0) 69 | if i == 0: 70 | waveform = waveform 71 | else: 72 | waveform = torch.cat([waveform, waveform]) 73 | 74 | 75 | if self.augmentations is not None and self.transform and self.train: 76 | aug_waveform = self.augmentations(waveform) 77 | else: 78 | aug_waveform = waveform 79 | 80 | 81 | return aug_waveform, waveform 82 | 83 | 84 | 85 | 86 | class DummyUnsupervisedDataset(Dataset): 87 | def __init__(self, size=1000): 88 | self.size = size 89 | 90 | def __len__(self): 91 | return self.size 92 | 93 | def __getitem__(self, idx): 94 | 95 | audio = torch.rand(1, 16000) 96 | labeled = torch.tensor(0) 97 | labels = torch.zeros(10) 98 | 99 | return { 100 | "audio": audio, 101 | "labels": labels, 102 | "labeled": labeled 103 | } -------------------------------------------------------------------------------- /SemiSupCon/dataloading/utils/loading_utils.py: -------------------------------------------------------------------------------- 1 | 2 | import soundfile as sf 3 | import numpy as np 4 | import torch 5 | from encodec.utils import convert_audio 6 | 7 | def load_random_audio_chunk(path, target_samples, target_sample_rate, allow_overlapping = False, n_augmentations = 2): 8 | extension = path.split(".")[-1] 9 | try: 10 | info = sf.info(path) 11 | sample_rate = info.samplerate 12 | except Exception as e: 13 | print(e) 14 | return None 15 | if extension == "mp3": 16 | n_frames = info.frames - 8192 17 | else: 18 | n_frames = info.frames 19 | 20 | new_target_samples = int(target_samples * sample_rate / target_sample_rate) 21 | 22 | if n_frames < new_target_samples: 23 | # print(f'File {path} is too short, tried to load {new_target_samples} samples, but only has {n_frames} samples') 24 | if n_frames < new_target_samples / n_augmentations: 25 | return None 26 | else: 27 | one_chunk = int(new_target_samples / n_augmentations) 28 | audios = [] 29 | for i in range(n_augmentations): 30 | start_idx = np.random.randint(low=0, high=n_frames - one_chunk) 31 | waveform, sample_rate = sf.read( 32 | path, start=start_idx, stop=start_idx + one_chunk, dtype='float32', always_2d=True) 33 | waveform = torch.Tensor(waveform.transpose()) 34 | audio = convert_audio( 35 | waveform, sample_rate, target_sample_rate, 1) 36 | audios.append(audio) 37 | audio = torch.cat(audios, dim=0) 38 | return audio 39 | else: 40 | start_idx = np.random.randint(low=0, high=n_frames - new_target_samples) 41 | 42 | 43 | try: 44 | waveform, sample_rate = sf.read( 45 | path, start=start_idx, stop=start_idx + new_target_samples, dtype='float32', always_2d=True) 46 | 47 | waveform = torch.Tensor(waveform.transpose()) 48 | except Exception as e: 49 | print(e) 50 | return None 51 | 52 | audio = convert_audio( 53 | waveform, sample_rate, target_sample_rate, 1) 54 | 55 | return audio 56 | 57 | def load_audio_and_split_in_chunks(path, target_samples, target_sample_rate): 58 | try: 59 | info = sf.info(path) 60 | sample_rate = info.samplerate 61 | waveform, sample_rate = sf.read( 62 | path, dtype='float32', always_2d=True) 63 | except Exception as e: 64 | print(e) 65 | return None 66 | 67 | 68 | waveform = torch.Tensor(waveform.transpose()) 69 | encodec_audio = convert_audio( 70 | waveform, sample_rate, target_sample_rate, 1) 71 | 72 | #ssplit audio into chunks of target_samples 73 | chunks = torch.split(encodec_audio, target_samples, dim=1) 74 | if len(chunks) > 1: 75 | audio = torch.cat(chunks[:-1]) ## drop the last one to avoid padding 76 | else: 77 | 78 | audio = chunks[0] 79 | if audio.size(1) < target_samples: 80 | return None 81 | 82 | return audio 83 | 84 | 85 | def load_full_audio(path, target_sample_rate): 86 | try: 87 | info = sf.info(path) 88 | sample_rate = info.samplerate 89 | 90 | waveform, sample_rate = sf.read( 91 | path, dtype='float32', always_2d=True) 92 | except Exception as e: 93 | print(e) 94 | return None 95 | 96 | 97 | waveform = torch.Tensor(waveform.transpose()) 98 | encodec_audio = convert_audio( 99 | waveform, sample_rate, target_sample_rate, 1) 100 | 101 | return encodec_audio -------------------------------------------------------------------------------- /SemiSupCon/models/encoders/samplecnn.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | 3 | 4 | class SampleCNN(nn.Module): 5 | def __init__(self, 6 | strides=[3, 3, 3, 3, 3, 3, 3, 3, 3], 7 | supervised=False, out_dim = 128): 8 | super(SampleCNN, self).__init__() 9 | 10 | self.strides = strides 11 | self.supervised = supervised 12 | self.sequential = [ 13 | nn.Sequential( 14 | nn.Conv1d(1, 128, kernel_size=3, stride=3, padding=0), 15 | nn.BatchNorm1d(128), 16 | nn.ReLU(), 17 | ) 18 | ] 19 | 20 | self.hidden = [ 21 | [128, 128], 22 | [128, 128], 23 | [128, 256], 24 | [256, 256], 25 | [256, 256], 26 | [256, 256], 27 | [256, 256], 28 | [256, 256], 29 | [256, 512], 30 | ] 31 | 32 | assert len(self.hidden) == len( 33 | self.strides 34 | ), "Number of hidden layers and strides are not equal" 35 | for stride, (h_in, h_out) in zip(self.strides, self.hidden): 36 | self.sequential.append( 37 | nn.Sequential( 38 | nn.Conv1d(h_in, h_out, kernel_size=stride, stride=1, padding=1), 39 | nn.BatchNorm1d(h_out), 40 | nn.ReLU(), 41 | nn.MaxPool1d(stride, stride=stride), 42 | ) 43 | ) 44 | 45 | # 1 x 512 46 | self.sequential.append( 47 | nn.Sequential( 48 | nn.Conv1d(512, 512, kernel_size=3, stride=1, padding=1), 49 | nn.BatchNorm1d(512), 50 | nn.ReLU(), 51 | ) 52 | ) 53 | 54 | self.sequential = nn.Sequential(*self.sequential) 55 | 56 | if self.supervised: 57 | self.dropout = nn.Dropout(0.5) 58 | self.fc = nn.Linear(512, out_dim) 59 | 60 | def forward(self, x): 61 | out = self.sequential(x) 62 | if self.supervised: 63 | out = self.dropout(out) 64 | 65 | out = out.reshape(x.shape[0], out.size(1) * out.size(2)) 66 | # logit = self.fc(out) 67 | return out -------------------------------------------------------------------------------- /SemiSupCon/models/encoders/samplecnn_xl.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | from .model import Model 4 | 5 | 6 | class SampleCNNXL(nn.Module): 7 | def __init__(self, 8 | strides=[3, 3, 3, 3, 3, 3, 3, 3, 3], 9 | supervised=False, out_dim = 128): 10 | super(SampleCNNXL, self).__init__() 11 | 12 | self.strides = strides 13 | self.supervised = supervised 14 | self.sequential = [ 15 | nn.Sequential( 16 | nn.Conv1d(1, 128, kernel_size=3, stride=3, padding=0), 17 | nn.BatchNorm1d(128), 18 | nn.ReLU(), 19 | ) 20 | ] 21 | 22 | self.hidden = [ 23 | [128, 128], 24 | [128, 128], 25 | [128, 256], 26 | [256, 256], 27 | [256, 512], 28 | [512, 512], 29 | [512, 1024], 30 | [1024, 1024], 31 | [1024, 2048], 32 | ] 33 | 34 | assert len(self.hidden) == len( 35 | self.strides 36 | ), "Number of hidden layers and strides are not equal" 37 | for stride, (h_in, h_out) in zip(self.strides, self.hidden): 38 | self.sequential.append( 39 | nn.Sequential( 40 | nn.Conv1d(h_in, h_out, kernel_size=stride, stride=1, padding=1), 41 | nn.BatchNorm1d(h_out), 42 | nn.ReLU(), 43 | nn.MaxPool1d(stride, stride=stride), 44 | ) 45 | ) 46 | 47 | # 1 x 512 48 | self.sequential.append( 49 | nn.Sequential( 50 | nn.Conv1d(2048, 2048, kernel_size=3, stride=1, padding=1), 51 | nn.BatchNorm1d(2048), 52 | nn.ReLU(), 53 | ) 54 | ) 55 | 56 | self.sequential = nn.Sequential(*self.sequential) 57 | 58 | if self.supervised: 59 | self.dropout = nn.Dropout(0.5) 60 | self.fc = nn.Linear(2048, out_dim) 61 | 62 | def forward(self, x): 63 | out = self.sequential(x) 64 | if self.supervised: 65 | out = self.dropout(out) 66 | 67 | out = out.reshape(x.shape[0], out.size(1) * out.size(2)) 68 | # logit = self.fc(out) 69 | return out -------------------------------------------------------------------------------- /SemiSupCon/models/losses/semisupconloss.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import matplotlib.pyplot as plt 4 | 5 | 6 | class SSNTXent(nn.Module): 7 | 8 | def __init__(self, temperature=0.07, contrast_mode='all', 9 | base_temperature=0.07): 10 | super().__init__() 11 | self.temperature = temperature 12 | self.contrast_mode = contrast_mode 13 | self.base_temperature = base_temperature 14 | self.first_run = True 15 | self.sim_function = nn.CosineSimilarity(2) 16 | 17 | def get_similarities(self, features, temperature = None): 18 | if temperature is None: 19 | temperature = self.temperature 20 | return self.sim_function(features.unsqueeze(1),features.unsqueeze(0))/temperature 21 | 22 | def forward(self,features, positive_mask, negative_mask): 23 | 24 | ## features shape extended_batch, d_model 25 | ## mask shape extended_batch,extended_batch 26 | 27 | ## add zeros to negative and positive masks to prevent self-contrasting 28 | 29 | 30 | self_contrast = (~(torch.eye(positive_mask.shape[0], device = features.device).bool())).int() 31 | 32 | 33 | positive_mask = positive_mask * self_contrast 34 | positive_sums = positive_mask.sum(1) 35 | positive_sums[positive_sums == 0] = 1 36 | negative_mask = negative_mask * self_contrast 37 | 38 | 39 | original_cosim = self.get_similarities(features=features) 40 | 41 | original_cosim = torch.exp(original_cosim) ## remove this when reverting 42 | 43 | 44 | # pos = torch.sum( original_cosim * positive_mask, dim = 1) 45 | # neg = torch.sum( original_cosim * negative_mask, dim = 1) 46 | 47 | # log_prob = torch.log(pos / neg) 48 | 49 | pos = original_cosim 50 | neg = torch.sum( original_cosim * negative_mask, dim = 1, keepdim = True) 51 | 52 | log_prob = pos/neg 53 | 54 | log_prob = -torch.log(log_prob + 1e-6) ## zeros in here : how to avoid them? 55 | log_prob = log_prob * positive_mask 56 | log_prob = log_prob.sum(1) 57 | log_prob = log_prob / positive_sums 58 | 59 | loss = torch.mean(log_prob) 60 | 61 | return loss 62 | -------------------------------------------------------------------------------- /SemiSupCon/models/utils.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | def confusion_matrix(predictions, targets, num_classes, threshold=0.5): 4 | 5 | """ 6 | Calculate the confusion matrix for multiclass or multilabel classification. 7 | 8 | Args: 9 | - predictions (torch.Tensor): Tensor of predicted labels (without softmax/sigmoid) of shape (B, num_classes). 10 | - targets (torch.Tensor): Ground truth labels (one-hot for multilabel) of shape (B, num_classes). 11 | - num_classes (int): Number of classes. 12 | 13 | Returns: 14 | - confusion_matrix (torch.Tensor): Confusion matrix of shape (num_classes, num_classes). 15 | """ 16 | # Ensure that both predictions and targets have the same shape 17 | assert predictions.shape == targets.shape, "Shape mismatch between predictions and targets" 18 | 19 | # Threshold the predictions to obtain binary predictions for multilabel case 20 | if num_classes > 2: 21 | binary_predictions = (predictions >= threshold).int() 22 | else: 23 | binary_predictions = predictions.round().int() 24 | 25 | # Calculate confusion matrix for multiclass or multilabel case 26 | confusion_matrix = torch.matmul(targets.float().T, binary_predictions.float()) 27 | 28 | return confusion_matrix 29 | -------------------------------------------------------------------------------- /SemiSupCon/viz/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pliploop/SemiSupCon/47b15b76974a4c02923280106c3c239854cf0125/SemiSupCon/viz/.gitkeep -------------------------------------------------------------------------------- /config/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pliploop/SemiSupCon/47b15b76974a4c02923280106c3c239854cf0125/config/.gitkeep -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_emomusic.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : emomusic 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0001 55 | weight_decay: 0.000001 56 | data: 57 | ssl_task: null 58 | sl_task: emomusic 59 | target_length: 2.7 60 | target_sample_rate: 22050 61 | n_augmentations: 1 62 | transform: false 63 | n_classes: 2 64 | batch_size: 64 65 | num_workers: 16 66 | val_split: 0.15 67 | supervised_data_p: 1 68 | intrabatch_supervised_p: 1 69 | use_test_set: true 70 | fully_supervised: true 71 | sl_kwargs: 72 | data_dir: /import/c4dm-datasets/emoMusic45s 73 | log: false 74 | log_model: false 75 | ckpt_path: Checkpoints-finetuning 76 | resume_id: null 77 | resume_from_checkpoint: null 78 | early_stopping_patience: 200 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_giantsteps.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : giantsteps 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: giantsteps 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.15 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | test_audio_path : /import/research_c4dm/jpmg86/giantsteps-key-dataset/audio 74 | test_annotations_path : "/import/research_c4dm/jpmg86/giantsteps-key-dataset/annotations/key" 75 | train_audio_path : /import/research_c4dm/jpmg86/giantsteps-mtg-key-dataset/audio 76 | train_annotations_txt : "/import/research_c4dm/jpmg86/giantsteps-mtg-key-dataset/annotations/annotations.txt" 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints-finetuning 80 | resume_id: null 81 | resume_from_checkpoint: null 82 | early_stopping_patience: 50 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_gtzan.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : gtzan 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: gtzan 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.15 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | audio_path: /import/c4dm-datasets/gtzan_torchaudio/genres 74 | train_annotations_path : data/gtzan/train_filtered.txt 75 | val_annotations_path : data/gtzan/val_filtered.txt 76 | test_annotations_path : data/gtzan/test_filtered.txt 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints-finetuning 80 | resume_id: null 81 | resume_from_checkpoint: null 82 | early_stopping_patience: 50 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_medleydb.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : medleydb 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: medleydb 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | medleydb_path : data/medleydb 74 | medleydb_audio_path: /import/c4dm-datasets/MedleyDB_V1/V1 75 | medleydb_audio_path_v2: /import/c4dm-datasets/MedleyDB_V2/V2 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 10 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtat_all.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_all 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_all 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | csv_path : /import/c4dm-datasets/MagnaTagATune/annotations_final.csv 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 15 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtat_top50.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | csv_path : /import/c4dm-datasets/MagnaTagATune/annotations_final.csv 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 15 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtg_genre.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtg_genre 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtg_genre 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/data/splits/split-0/autotagging_genre-split.tsv 74 | audio_path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/mp3 75 | log: false 76 | log_model: false 77 | ckpt_path: Checkpoints-finetuning 78 | resume_id: null 79 | resume_from_checkpoint: null 80 | early_stopping_patience: 7 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtg_instr.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtg_instr 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtg_instr 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/data/splits/split-0/autotagging_instrument-split.tsv 74 | audio_path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/mp3 75 | log: false 76 | log_model: false 77 | ckpt_path: Checkpoints-finetuning 78 | resume_id: null 79 | resume_from_checkpoint: null 80 | early_stopping_patience: 7 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtg_mood.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtg_mood 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtg_mood 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/data/splits/split-0/autotagging_moodtheme-split.tsv 74 | audio_path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/mp3 75 | log: false 76 | log_model: false 77 | ckpt_path: Checkpoints-finetuning 78 | resume_id: null 79 | resume_from_checkpoint: null 80 | early_stopping_patience: 7 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_mtg_top50.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtg_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtg_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 32 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/data/splits/split-0/autotagging_top50tags-split.tsv 74 | audio_path: /import/c4dm-datasets/mtg-jamendo-raw/mtg-jamendo-dataset/mp3 75 | log: false 76 | log_model: false 77 | ckpt_path: Checkpoints-finetuning 78 | resume_id: null 79 | resume_from_checkpoint: null 80 | early_stopping_patience: 7 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_nsynth_instr_family.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 20 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : nsynth_instr_family 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: nsynth_instr_family 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path_dir : /import/c4dm-datasets/nsynth/nsynth 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 2 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_nsynth_pitch.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 20 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : nsynth_pitch 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: nsynth_pitch 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | path_dir : /import/c4dm-datasets/nsynth/nsynth 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 2 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_vocalset_singer.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : vocalset_singer 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: vocalset_singer 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | data_dir: '/import/c4dm-datasets/VocalSet1-2' 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 50 -------------------------------------------------------------------------------- /config/finetuning/cross-dataset/finetune_vocalset_technique.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 200 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : vocalset_technique 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: vocalset_technique 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | sl_kwargs: 73 | data_dir: '/import/c4dm-datasets/VocalSet1-2' 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints-finetuning 77 | resume_id: null 78 | resume_from_checkpoint: null 79 | early_stopping_patience: 50 -------------------------------------------------------------------------------- /config/finetuning/from_scratch/train_MTAT.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: -1 13 | min_epochs: null 14 | max_steps: 200000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: false 47 | mlp_head: false 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: mtat_top50 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | log: false 73 | log_model: false 74 | ckpt_path: Checkpoints-finetuning 75 | resume_id: null 76 | resume_from_checkpoint: null 77 | early_stopping_patience: 15 -------------------------------------------------------------------------------- /config/finetuning/main_results/finetune_MTAT.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: mtat_top50 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | log: false 73 | log_model: false 74 | ckpt_path: Checkpoints-finetuning 75 | resume_id: null 76 | resume_from_checkpoint: null 77 | early_stopping_patience: 15 -------------------------------------------------------------------------------- /config/finetuning/main_results/finetune_MTAT_tuneplus.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.tune.TunePlus 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: mtat_top50 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: false 64 | n_classes: 50 65 | batch_size: 64 66 | num_workers: 16 67 | val_split: 0.1 68 | supervised_data_p: 1 69 | intrabatch_supervised_p: 1 70 | use_test_set: true 71 | fully_supervised: true 72 | log: false 73 | log_model: false 74 | ckpt_path: Checkpoints-finetuning 75 | resume_id: null 76 | resume_from_checkpoint: null 77 | early_stopping_patience: 15 -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/bitcrush.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'bitcrush' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/chorus.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'chorus' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/compression.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'compression' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/distortion.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'distortion' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/mp3.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'mp3' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/reverb.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'reverb' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/reverse.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'reverse' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/splice.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'splice' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/only/stretch.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'timestretch' 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints-finetuning 79 | resume_id: null 80 | resume_from_checkpoint: null 81 | early_stopping_patience: 15 82 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2bitcrush.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'bitcrush' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2chorus.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'chorus' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2compression.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'compression' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2distortion.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'distortion' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2mp3.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'mp3' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2reverb.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'reverb' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2reverse.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'reverse' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2splice.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'splice' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/tier2_only/tier2stretch.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 10.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | - 'splice' 83 | - 'reverb' 84 | - 'chorus' 85 | - 'distortion' 86 | - 'compression' 87 | - 'reverse' 88 | - 'bitcrush' 89 | - 'mp3' 90 | log: false 91 | log_model: false 92 | ckpt_path: Checkpoints-finetuning 93 | resume_id: null 94 | resume_from_checkpoint: null 95 | early_stopping_patience: 15 96 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 5.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints-finetuning 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | early_stopping_patience: 15 88 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 6.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | - 'splice' 83 | log: false 84 | log_model: false 85 | ckpt_path: Checkpoints-finetuning 86 | resume_id: null 87 | resume_from_checkpoint: null 88 | early_stopping_patience: 15 89 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 7.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | - 'splice' 83 | - 'reverb' 84 | - 'chorus' 85 | log: false 86 | log_model: false 87 | ckpt_path: Checkpoints-finetuning 88 | resume_id: null 89 | resume_from_checkpoint: null 90 | early_stopping_patience: 15 91 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 8.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | - 'splice' 83 | - 'reverb' 84 | - 'chorus' 85 | - 'distortion' 86 | log: false 87 | log_model: false 88 | ckpt_path: Checkpoints-finetuning 89 | resume_id: null 90 | resume_from_checkpoint: null 91 | early_stopping_patience: 15 92 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/new_augmentations/with/Tier 9.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | - 'timestretch' 82 | - 'splice' 83 | - 'reverb' 84 | - 'chorus' 85 | - 'distortion' 86 | - 'compression' 87 | - 'reverse' 88 | log: false 89 | log_model: false 90 | ckpt_path: Checkpoints-finetuning 91 | resume_id: null 92 | resume_from_checkpoint: null 93 | early_stopping_patience: 15 94 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/severity=0.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 0 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | log: false 82 | log_model: false 83 | ckpt_path: Checkpoints-finetuning 84 | resume_id: null 85 | resume_from_checkpoint: null 86 | early_stopping_patience: 15 87 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/severity=1.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 1 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | log: false 82 | log_model: false 83 | ckpt_path: Checkpoints-finetuning 84 | resume_id: null 85 | resume_from_checkpoint: null 86 | early_stopping_patience: 15 87 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/severity=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 2 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | log: false 82 | log_model: false 83 | ckpt_path: Checkpoints-finetuning 84 | resume_id: null 85 | resume_from_checkpoint: null 86 | early_stopping_patience: 15 87 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/severity=3.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 3 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | log: false 82 | log_model: false 83 | ckpt_path: Checkpoints-finetuning 84 | resume_id: null 85 | resume_from_checkpoint: null 86 | early_stopping_patience: 15 87 | test: true -------------------------------------------------------------------------------- /config/finetuning/severity_experiments/severity=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: auto 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 100 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | freeze_encoder: true 47 | mlp_head: true 48 | checkpoint: null 49 | checkpoint_head : null 50 | task : mtat_top50 51 | optimizer: 52 | class_path: torch.optim.Adam 53 | init_args: 54 | lr: 0.0003 55 | weight_decay: 0.000001 56 | data: 57 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 58 | ssl_task: null 59 | sl_task: mtat_top50 60 | target_length: 2.7 61 | target_sample_rate: 22050 62 | n_augmentations: 1 63 | transform: true 64 | test_transform : true 65 | n_classes: 50 66 | batch_size: 64 67 | num_workers: 16 68 | val_split: 0.1 69 | supervised_data_p: 1 70 | intrabatch_supervised_p: 1 71 | use_test_set: true 72 | fully_supervised: true 73 | severity_modifier: 4 74 | aug_list: 75 | - 'gain' 76 | - 'polarity_inversion' 77 | - 'add_colored_noise' 78 | - 'filtering' 79 | - 'pitch_shift' 80 | - 'delay' 81 | log: false 82 | log_model: false 83 | ckpt_path: Checkpoints-finetuning 84 | resume_id: null 85 | resume_from_checkpoint: null 86 | early_stopping_patience: 15 87 | test: true -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/sl/M=16.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 16 60 | transform: true 61 | n_classes: 50 62 | batch_size: 12 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/sl/M=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/sl/M=32.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 32 60 | transform: true 61 | n_classes: 50 62 | batch_size: 6 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/sl/M=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 4 60 | transform: true 61 | n_classes: 50 62 | batch_size: 48 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/sl/M=8.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 8 60 | transform: true 61 | n_classes: 50 62 | batch_size: 24 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/smsl/M=16.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 16 60 | transform: true 61 | n_classes: 50 62 | batch_size: 12 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/smsl/M=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/smsl/M=32.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 32 60 | transform: true 61 | n_classes: 50 62 | batch_size: 6 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/smsl/M=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 4 60 | transform: true 61 | n_classes: 50 62 | batch_size: 48 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/smsl/M=8.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 8 60 | transform: true 61 | n_classes: 50 62 | batch_size: 24 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/ssl/M=16.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 16 60 | transform: true 61 | n_classes: 50 62 | batch_size: 12 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/ssl/M=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/ssl/M=32.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 32 60 | transform: true 61 | n_classes: 50 62 | batch_size: 6 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/ssl/M=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 4 60 | transform: true 61 | n_classes: 50 62 | batch_size: 48 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/augmentations/ssl/M=8.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 8 60 | transform: true 61 | n_classes: 50 62 | batch_size: 24 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/cross-dataset/smsl.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | optimizer: 48 | class_path: torch.optim.Adam 49 | init_args: 50 | lr: 0.0001 51 | data: 52 | sl_task: 'mtat_top50' 53 | ssl_task: 'fma' 54 | target_length: 2.7 55 | target_sample_rate: 22050 56 | n_augmentations: 2 57 | transform: true 58 | n_classes: 50 59 | batch_size: 96 60 | num_workers: 32 61 | val_split: 0.1 62 | supervised_data_p: 1 63 | intrabatch_supervised_p: 1 64 | use_test_set: true 65 | fully_supervised: true 66 | aug_list: 67 | - 'gain' 68 | - 'polarity_inversion' 69 | - 'add_colored_noise' 70 | - 'filtering' 71 | - 'pitch_shift' 72 | - 'delay' 73 | severity_modifier: 2 74 | log: false 75 | log_model: false 76 | ckpt_path: Checkpoints 77 | resume_id: null 78 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/bs/bs=005.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.05 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/bs/bs=01.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/bs/bs=025.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.25 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/bs/bs=05.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/bs/bs=075.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.75 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/ps/ps=005.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 0.05 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/ps/ps=01.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 0.1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/ps/ps=025.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 0.25 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/ps/ps=05.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 0.5 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/ps_bs/ps/ps=075.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 0.75 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/sl/sl_T=1.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/sl/sl_T=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 2 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/sl/sl_T=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 4 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/sl/sl_T=6.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 6 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/sl/sl_T=weight.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: weighted 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 1 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/smsl/smsl_T=2.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 2 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/smsl/smsl_T=4.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 4 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/smsl/smsl_T=6.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: 6 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/experiments/threshold/smsl/smsl_T=weight.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: null 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: true 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | pos_thresh: weighted 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | data_dir: '/import/research_c4dm/JulienMarcoChrisRMRI/MTAT_wav' 54 | task: 'mtat_top50' 55 | sl_task: 'mtat_top50' 56 | ssl_task: 'fma' 57 | target_length: 2.7 58 | target_sample_rate: 22050 59 | n_augmentations: 2 60 | transform: true 61 | n_classes: 50 62 | batch_size: 96 63 | num_workers: 32 64 | val_split: 0.1 65 | supervised_data_p: 1 66 | intrabatch_supervised_p: 0.5 67 | use_test_set: true 68 | fully_supervised: false 69 | aug_list: 70 | - 'gain' 71 | - 'polarity_inversion' 72 | - 'add_colored_noise' 73 | - 'filtering' 74 | - 'pitch_shift' 75 | - 'delay' 76 | severity_modifier: 2 77 | log: false 78 | log_model: false 79 | ckpt_path: Checkpoints 80 | resume_id: null 81 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/model_configs/samplecnn_config.yaml: -------------------------------------------------------------------------------- 1 | encoder: 2 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 3 | init_args: 4 | strides: 5 | - 3 6 | - 3 7 | - 3 8 | - 3 9 | - 3 10 | - 3 11 | - 3 12 | - 3 13 | - 3 14 | supervised: false 15 | out_dim: 128 -------------------------------------------------------------------------------- /config/pretraining/model_configs/tune_config.yaml: -------------------------------------------------------------------------------- 1 | encoder: 2 | class_path: SemiSupCon.models.encoders.tune.TunePlus 3 | init_args: 4 | in_channels: 11 5 | n_classes: 1 6 | eval_layer: null -------------------------------------------------------------------------------- /config/pretraining/pretrain_sl.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: 1000 13 | min_epochs: null 14 | max_steps: -1 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | optimizer: 48 | class_path: torch.optim.Adam 49 | init_args: 50 | lr: 0.0001 51 | data: 52 | sl_task: 'mtat_top50' 53 | target_length: 2.7 54 | target_sample_rate: 22050 55 | n_augmentations: 2 56 | transform: true 57 | n_classes: 50 58 | batch_size: 96 59 | num_workers: 32 60 | val_split: 0.1 61 | supervised_data_p: 1 62 | intrabatch_supervised_p: 1 63 | fully_supervised: true 64 | use_test_set: true 65 | sl_kwargs: 66 | csv_path : /import/c4dm-datasets/MagnaTagATune/annotations_final.csv 67 | log: false 68 | log_model: false 69 | ckpt_path: Checkpoints 70 | resume_id: null 71 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/pretrain_smsl.yaml: -------------------------------------------------------------------------------- 1 | 2 | # pytorch_lightning==2.1.0 3 | seed_everything: 123 4 | trainer: 5 | accelerator: auto 6 | strategy: auto 7 | devices: [6] 8 | num_nodes: 1 9 | precision: null 10 | logger: null 11 | callbacks: null 12 | fast_dev_run: false 13 | max_epochs: -1 14 | min_epochs: null 15 | max_steps: 200000 16 | min_steps: null 17 | max_time: null 18 | limit_train_batches: null 19 | limit_val_batches: null 20 | limit_test_batches: null 21 | limit_predict_batches: null 22 | overfit_batches: 0.0 23 | val_check_interval: null 24 | check_val_every_n_epoch: 1 25 | num_sanity_val_steps: null 26 | log_every_n_steps: null 27 | enable_checkpointing: null 28 | enable_progress_bar: null 29 | enable_model_summary: null 30 | accumulate_grad_batches: 1 31 | gradient_clip_val: null 32 | gradient_clip_algorithm: null 33 | deterministic: null 34 | benchmark: null 35 | inference_mode: true 36 | use_distributed_sampler: true 37 | profiler: null 38 | detect_anomaly: false 39 | barebones: false 40 | plugins: null 41 | sync_batchnorm: false 42 | reload_dataloaders_every_n_epochs: 0 43 | default_root_dir: null 44 | model: 45 | encoder: 46 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 47 | temperature: 0.1 48 | optimizer: 49 | class_path: torch.optim.Adam 50 | init_args: 51 | lr: 0.0001 52 | data: 53 | sl_task: 'mtat_top50' 54 | #none if no split 55 | ssl_task: 'fma' 56 | target_length: 2.7 57 | target_sample_rate: 22050 58 | n_augmentations: 2 59 | transform: true 60 | n_classes: 50 61 | batch_size: 96 62 | num_workers: 32 63 | val_split: 0.1 64 | #proportion of supervised data you use 65 | supervised_data_p: 0 66 | #percentage of each batch that will be unlabelled/labelled - between 0 to 1 - default could be 0.5 67 | intrabatch_supervised_p: 0 68 | #set to True if fully supervised 69 | fully_supervised: false 70 | use_test_set: true 71 | #leave the list empty if you dont need it 72 | aug_list: 73 | - 'gain' 74 | - 'polarity_inversion' 75 | - 'add_colored_noise' 76 | - 'filtering' 77 | - 'pitch_shift' 78 | - 'delay' 79 | severity_modifier: 2 80 | sl_kwargs: 81 | csv_path : /import/c4dm-datasets/MagnaTagATune/annotations_final.csv 82 | log: false 83 | log_model: false 84 | ckpt_path: Checkpoints 85 | resume_id: null 86 | resume_from_checkpoint: null 87 | -------------------------------------------------------------------------------- /config/pretraining/pretrain_smsl_tuneplus.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [6] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: -1 13 | min_epochs: null 14 | max_steps: 200000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.tune.TunePlus 46 | temperature: 0.1 47 | optimizer: 48 | class_path: torch.optim.Adam 49 | init_args: 50 | lr: 0.0001 51 | data: 52 | sl_task: 'mtat_top50' 53 | ssl_task: 'fma' 54 | target_length: 2.7 55 | target_sample_rate: 22050 56 | n_augmentations: 2 57 | transform: true 58 | n_classes: 50 59 | batch_size: 96 60 | num_workers: 32 61 | val_split: 0.1 62 | supervised_data_p: 1 63 | intrabatch_supervised_p: 0.5 64 | fully_supervised: false 65 | use_test_set: true 66 | aug_list: 67 | - 'gain' 68 | - 'polarity_inversion' 69 | - 'add_colored_noise' 70 | - 'filtering' 71 | - 'pitch_shift' 72 | - 'delay' 73 | severity_modifier: 2 74 | sl_kwargs: 75 | csv_path : /import/c4dm-datasets/MagnaTagATune/annotations_final.csv 76 | log: false 77 | log_model: false 78 | ckpt_path: Checkpoints 79 | resume_id: null 80 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /config/pretraining/pretrain_ssl.yaml: -------------------------------------------------------------------------------- 1 | # pytorch_lightning==2.1.0 2 | seed_everything: 123 3 | trainer: 4 | accelerator: auto 5 | strategy: auto 6 | devices: [5] 7 | num_nodes: 1 8 | precision: null 9 | logger: null 10 | callbacks: null 11 | fast_dev_run: false 12 | max_epochs: -1 13 | min_epochs: null 14 | max_steps: 50000 15 | min_steps: null 16 | max_time: null 17 | limit_train_batches: null 18 | limit_val_batches: null 19 | limit_test_batches: null 20 | limit_predict_batches: null 21 | overfit_batches: 0.0 22 | val_check_interval: null 23 | check_val_every_n_epoch: 1 24 | num_sanity_val_steps: null 25 | log_every_n_steps: null 26 | enable_checkpointing: null 27 | enable_progress_bar: null 28 | enable_model_summary: null 29 | accumulate_grad_batches: 1 30 | gradient_clip_val: null 31 | gradient_clip_algorithm: null 32 | deterministic: null 33 | benchmark: null 34 | inference_mode: true 35 | use_distributed_sampler: true 36 | profiler: null 37 | detect_anomaly: false 38 | barebones: false 39 | plugins: null 40 | sync_batchnorm: false 41 | reload_dataloaders_every_n_epochs: 0 42 | default_root_dir: null 43 | model: 44 | encoder: 45 | class_path: SemiSupCon.models.encoders.samplecnn.SampleCNN 46 | temperature: 0.1 47 | optimizer: 48 | class_path: torch.optim.Adam 49 | init_args: 50 | lr: 0.0001 51 | data: 52 | ssl_task: 'fma' 53 | target_length: 2.7 54 | target_sample_rate: 22050 55 | n_augmentations: 2 56 | transform: true 57 | n_classes: 50 58 | batch_size: 96 59 | num_workers: 24 60 | val_split: 0.1 61 | supervised_data_p: 0 62 | intrabatch_supervised_p: 0 63 | fully_supervised: false 64 | use_test_set: true 65 | log: false 66 | log_model: false 67 | ckpt_path: Checkpoints 68 | resume_id: null 69 | resume_from_checkpoint: null -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pliploop/SemiSupCon/47b15b76974a4c02923280106c3c239854cf0125/data/.gitkeep -------------------------------------------------------------------------------- /media/SMSL_Horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pliploop/SemiSupCon/47b15b76974a4c02923280106c3c239854cf0125/media/SMSL_Horizontal.png -------------------------------------------------------------------------------- /scripts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pliploop/SemiSupCon/47b15b76974a4c02923280106c3c239854cf0125/scripts/.gitkeep -------------------------------------------------------------------------------- /scripts/purge_wandb.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import wandb 4 | 5 | def delete_folders(checkpoint_folders = ['Checkpoints','Checkpoints-finetuning'], wandb_projects = ['SemiSupCon','SemiSupCon-finetuning2','SemiSupCon-eval']): 6 | runs = [] 7 | for project_name in wandb_projects: 8 | runs.extend(wandb.Api().runs(f'jul-guinot/{project_name}')) 9 | 10 | run_names = [run.name for run in runs] 11 | 12 | for folder in checkpoint_folders: 13 | for subdir in os.listdir(folder): 14 | subdir_path = os.path.join(folder, subdir) 15 | if os.path.isdir(subdir_path): 16 | subdir_name = os.path.basename(subdir_path) 17 | if subdir_name not in run_names: 18 | # os.system(f"rm -rf {subdir_path}") 19 | print(f"Removed folder: {subdir_path}") # Pretty print removed folder 20 | 21 | 22 | 23 | 24 | if __name__ == "__main__": 25 | 26 | 27 | delete_folders() 28 | --------------------------------------------------------------------------------