StepLR class

Multiplies the LR by gamma every stepSize steps.

lr(t) = initialLr * gamma^floor(t / stepSize)
Inheritance

Constructors

StepLR(Optimizer optimizer, {required double initialLr, required int stepSize, double gamma = 0.1})

Properties

gamma double
final
hashCode int
The hash code for this object.
no setterinherited
initialLr double
final
lastLr double?
The most recently applied LR (== optimizer.lr unless the caller mutated it externally). null before the first step().
no setterinherited
optimizer Optimizer
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stepCount int
Steps taken so far. 0 before the first step() call. After the first step(), stepCount == 1 and optimizer.lr reflects the LR for that first step.
getter/setter pairinherited
stepSize int
final

Methods

lrAt(int step) double
The LR that will be applied on the next step() call.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
step() → void
Advance one step and write the new LR into the wrapped optimizer. Call this AFTER optimizer.step().
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited