ExponentialLRScheduler

Models & Types ยท AiDotNet.LearningRateSchedulers

Decays the learning rate exponentially every step.

Inheritance: LearningRateSchedulerBase โ†’ ExponentialLRScheduler

For Beginners

This scheduler smoothly reduces the learning rate at every step by multiplying it by a factor (gamma). Unlike StepLR which makes sudden drops, exponential decay provides a gradual, continuous reduction. Think of it like gradually releasing pressure from a gas pedal rather than making sudden brake taps.

How It Works

ExponentialLR decays the learning rate by gamma every step. This provides a smooth, continuous decay that can be useful for certain training scenarios.

Formula: lr = base_lr * gamma^step

Example

using AiDotNet.LearningRateSchedulers;
// Decay by 0.95 every epoch
var scheduler = new ExponentialLRScheduler(
    baseLearningRate: 0.1,
    gamma: 0.95
);

Constructors

Constructor Summary
ExponentialLRScheduler(double baseLearningRate, double gamma, double minLearningRate) Initializes a new instance of the ExponentialLRScheduler class.

Properties

Property Summary
double Gamma { get; } Gets the multiplicative factor of learning rate decay.

Methods

Method Summary
Dictionary<string, object> GetState()