selfeeg.losses

This module collects all the losses implemented for the contrastive learning algorithms of the ssl module.

losses.losses module

Functions

barlow_loss

Pytorch implementation of the Barlow Twins loss function as presented in [barlow] .

byol_loss

Simple pytorch implementation of the BYOL loss function presented in [BYOL] .

moco_loss

Simple implementation of the MoCo loss function [moco2].

simclr_loss

simclr_loss computes the normalized temperature-scaled cross entropy loss [NTXent] , which is used in many contrastive learning algorithm.

simsiam_loss

Simple implementation of the SimSiam [simsiam] loss function with the possibility to not normalize tensors.

vicreg_loss

Pytorch implementation of the VICReg loss function [VIC] .