DINOTrainer#

class stable_ssl.trainers.DINOTrainer(warmup_temperature_teacher: float = 0.04, temperature_teacher: float = 0.07, warmup_epochs_temperature_teacher: int = 30, temperature_student: float = 0.1, center_momentum: float = 0.9, **kwargs)[source]#

Bases: SelfDistillationTrainer

DINO SSL model by [Caron et al., 2021].

Parameters:
  • warmup_temperature_teacher (float, optional) – The initial temperature for the teacher output. Default is 0.04.

  • temperature_teacher (float, optional) – The temperature for the teacher output. Default is 0.07.

  • warmup_epochs_temperature_teacher (int, optional) – The number of epochs to warm up the teacher temperature. Default is 30.

  • temperature_student (float, optional) – The temperature for the student output. Default is 0.1.

  • center_momentum (float, optional) – The momentum used to update the center. Default is 0.9.

  • **kwargs – Additional arguments passed to the base class.

compute_loss()[source]#

Compute the DINO loss.