Skip to content
class

ExponentialLR

extendsLRScheduler
ExponentialLR

Geometric decay — multiply lr by γ\gamma every epoch.

Math

ηt=η0⋅γt \eta_t = \eta_0 \cdot \gamma^{t}

Attributes

gamma_float
Per-epoch multiplicative factor (typically slightly below 1).

Constructors

1
ctor

ExponentialLR

void ExponentialLR(Optimizer & opt, double gamma)

Build an exponential decay schedule.

Parameters

Target optimiser.
gammafloat
Per-epoch multiplicative factor.

Methods

1
fnconst

compute_lr_at

→float
double compute_lr_at(int epoch)

Evaluate η0γt\eta_0 \gamma^t at epoch.

Parameters

epochint
Current epoch.

Returns

float

base_lr_ * gamma_ ** epoch.