Package ai.djl.training.tracker
Class CosineTracker
java.lang.Object
ai.djl.training.tracker.CosineTracker
- All Implemented Interfaces:
ParameterTracker,Tracker
CosineTracker is an implementation of Tracker which is updated by taking sections
of a cosine curve to smoothly reduce learning rate until a specified step and base learning rate.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe Builder to construct anCosineTrackerobject. -
Constructor Summary
ConstructorsConstructorDescriptionCosineTracker(CosineTracker.Builder builder) Creates a new instance ofCosineTracker. -
Method Summary
Modifier and TypeMethodDescriptionstatic CosineTracker.Builderbuilder()Creates a new builder.floatgetNewValue(int numUpdate) Fetches the value after the given number of steps/updates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.djl.training.tracker.Tracker
getNewValue
-
Constructor Details
-
CosineTracker
Creates a new instance ofCosineTracker.- Parameters:
builder- the builder to create a new instance ofCosineTracker
-
-
Method Details
-
builder
Creates a new builder.- Returns:
- a new builder
-
getNewValue
public float getNewValue(int numUpdate) Fetches the value after the given number of steps/updates.- Specified by:
getNewValuein interfaceTracker- Parameters:
numUpdate- the total number of steps/updates- Returns:
- this
Builder
-