selfeeg.ssl
The ssl module collects different self-supervised learning algorithms applied for the analysis of EEG Data. Each algorithm included an already implemented fit and test method, to speed up the pretraining process. In addition, this module includes an implementation of the fine-tuning function that can also be used as a standalone fit method.
It is divided in two submodules:
base: a submodule that include the basic objects and functions for both the pretraining and fine-tuning process.
contrastive: a collection of contrastive learning algorithms.
predictive: a collection of predictive pretraining algorithms.
generative: a collection of generative pretraining algorithms.
ssl.base module
Classes
Pytorch implementation of an early stopper. |
|
Baseline Self-Supervised Learning nn.Module. |
Functions
evaluates a custom loss function. |
|
performs fine-tuning of a given model. |
ssl.contrastive module
Classes
Implementation of the Barlow twins SSL method. |
|
Implementation of the BYOL SSL method. |
|
Implementation of the MoCo SSL method. |
|
Implementation of the SimCLR SSL method. |
|
Implementation of the SimSiam SSL method. |
|
Implementation of the VICReg SSL method. |
ssl.generative module
Classes
Implementation of a reconstructive pretraining method. |
ssl.predictive module
Classes
Implementation of a standard predictive Pretraining. |