Class CosineTracker

java.lang.Object
ai.djl.training.tracker.CosineTracker
All Implemented Interfaces:
ParameterTracker, Tracker

public class CosineTracker extends Object implements 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.
See Also:
  • Constructor Details

    • CosineTracker

      public CosineTracker(CosineTracker.Builder builder)
      Creates a new instance of CosineTracker.
      Parameters:
      builder - the builder to create a new instance of CosineTracker
  • Method Details

    • builder

      public static CosineTracker.Builder 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:
      getNewValue in interface Tracker
      Parameters:
      numUpdate - the total number of steps/updates
      Returns:
      this Builder