Class StepLearningRate

java.lang.Object
com.jml.optimizers.Scheduler
com.jml.optimizers.StepLearningRate

public class StepLearningRate extends Scheduler
StepLearningRate is a Scheduler which "steps" the learning rate at regular intervals during optimization. The step is computed by a factor. That is, every specified number of iterations of the optimizer, the learning rate will be multiplied by this factor.

The default step factor is 0.8.
The default interval is 10 iterations.
  • Constructor Details

    • StepLearningRate

      public StepLearningRate()
      Creates a default StepLearningRate scheduler with factor of 0.8 and an interval of 10.
    • StepLearningRate

      public StepLearningRate(double stepFactor)
      Creates a StepLearningRate with specified factor and the default interval of 10.
      Parameters:
      stepFactor - Factor to multiply the learning rate by every 10 iterations.
    • StepLearningRate

      public StepLearningRate(double stepFactor, int interval)
      Creates a StepLearningRate with specified factor and the interval.
      Parameters:
      stepFactor - Factor to multiply the learning rate by every interval.
      interval - Specified number of optimizer iterations to apply before applying this scheduler rule.
  • Method Details

    • step

      public void step(Optimizer optm)
      Description copied from class: Scheduler
      Applies the specified scheduler rule to the learning rate of the optimizer.
      Specified by:
      step in class Scheduler
      Parameters:
      optm - Optimizer to apply this Scheduler to. return The new learning rate according to the specific Schedulers rules.