Package ai.djl.training.tracker
Class FixedPerVarTracker
- java.lang.Object
-
- ai.djl.training.tracker.FixedPerVarTracker
-
- All Implemented Interfaces:
ParameterTracker
public class FixedPerVarTracker extends java.lang.Object implements ParameterTracker
FixedPerVarTracker
is an implementation ofTracker
which returns a fixed value.- See Also:
Tracker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FixedPerVarTracker.Builder
The Builder to construct anFixedPerVarTracker
object.
-
Constructor Summary
Constructors Constructor Description FixedPerVarTracker(FixedPerVarTracker.Builder builder)
Creates a new instance ofFixedPerVarTracker
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FixedPerVarTracker.Builder
builder()
Creates a builder to build aFixedPerVarTracker
.float
getNewValue(java.lang.String parameterId, int numUpdate)
Fetches the value after the given number of steps/updates for the parameter.
-
-
-
Constructor Detail
-
FixedPerVarTracker
public FixedPerVarTracker(FixedPerVarTracker.Builder builder)
Creates a new instance ofFixedPerVarTracker
.- Parameters:
builder
- the builder used to build this object
-
-
Method Detail
-
getNewValue
public float getNewValue(java.lang.String parameterId, int numUpdate)
Fetches the value after the given number of steps/updates for the parameter.- Specified by:
getNewValue
in interfaceParameterTracker
- Parameters:
parameterId
- the id of the parameter to get the new value fornumUpdate
- the total number of steps/updates- Returns:
- this
Builder
-
builder
public static FixedPerVarTracker.Builder builder()
Creates a builder to build aFixedPerVarTracker
.- Returns:
- a new builder
-
-