Class FactorTracker.Builder

java.lang.Object
ai.djl.training.tracker.FactorTracker.Builder
Enclosing class:
FactorTracker

public static final class FactorTracker.Builder extends Object
The Builder to construct an FactorTracker object.
  • Method Details

    • setBaseValue

      public FactorTracker.Builder setBaseValue(float baseValue)
      Sets the initial value after no steps.
      Parameters:
      baseValue - the initial value
      Returns:
      this Builder
    • setFactor

      public FactorTracker.Builder setFactor(float factor)
      Sets the value of the multiplicative factor.
      Parameters:
      factor - the value of the multiplicative factor
      Returns:
      this Builder
    • optMinValue

      public FactorTracker.Builder optMinValue(float min)
      Sets the minimum value.

      This is equivalent to the max updates. Only one can be set.

      Parameters:
      min - the minimum value
      Returns:
      this Builder
    • optMaxUpdates

      public FactorTracker.Builder optMaxUpdates(int maxUpdates)
      Sets the maximum number of updates after which the value should remain constant.
      Parameters:
      maxUpdates - the maximum number of updates after which the value should remain constant
      Returns:
      this Builder
    • build

      public FactorTracker build()
      Builds a FactorTracker block.
      Returns:
      the FactorTracker block