TemperatureScheduler

Models & Types · AiDotNet.SelfSupervisedLearning

Schedules temperature parameters during self-supervised learning training.

For Beginners

Temperature controls how “sharp” or “soft” the probability distribution is in contrastive learning. Different methods schedule temperature differently during training to improve learning dynamics.

How It Works

Temperature effects:

Common scheduling strategies:

Constructors

Constructor Summary
TemperatureScheduler(TemperatureScheduleType scheduleType, double initialTemperature, double finalTemperature, int warmupSteps, int totalSteps) Initializes a new instance of the TemperatureScheduler class.

Properties

Property Summary
TemperatureScheduleType ScheduleType { get; } Gets the schedule type being used.
double FinalTemperature { get; } Gets the final temperature value.
double InitialTemperature { get; } Gets the initial temperature value.

Methods

Method Summary
TemperatureScheduler Constant(double temperature) Creates a scheduler for constant temperature (SimCLR, MoCo default).
TemperatureScheduler CosineAnneal(double highTemperature, double lowTemperature, int totalSteps) Creates a scheduler with cosine annealing from high to low temperature.
TemperatureScheduler ForDINOTeacher(double initialTemperature, double finalTemperature, int warmupEpochs, int totalEpochs) Creates a scheduler for DINO teacher temperature warmup.
double GetTemperature(int currentStep) Gets the temperature value for the current training step.
double GetTemperatureForEpoch(int currentEpoch, int totalEpochs) Gets the temperature value for the current epoch.