Class RMSProp

java.lang.Object
org.tribuo.math.optimisers.RMSProp
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, StochasticGradientOptimiser

public class RMSProp extends Object implements StochasticGradientOptimiser
An implementation of the RMSProp gradient optimiser.

Creates one copy of the parameters to store learning rates. Follows the Keras implementation.

See:

 Tieleman, T. and Hinton, G.
 Lecture 6.5 - RMSProp, COURSERA: Neural Networks for Machine Learning.
 Technical report, 2012.
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    RMSProp(double initialLearningRate, double rho)
    Constructs an RMSProp gradient optimiser using the specified parameters with epsilon set to 1e-8 and decay to 0.0.
    RMSProp(double initialLearningRate, double rho, double epsilon, double decay)
    Constructs an RMSProp gradient optimiser using the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Copies a gradient optimiser with it's configuration.
    com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
     
    void
    initialise(Parameters parameters)
    Initialises the gradient optimiser.
    void
    Used by the OLCUT configuration system, and should not be called by external code.
    void
    Resets the optimiser so it's ready to optimise a new Parameters.
    step(Tensor[] updates, double weight)
    Take a Tensor array of gradients and transform them according to the current weight and learning rates.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.tribuo.math.StochasticGradientOptimiser

    finalise
  • Constructor Details

    • RMSProp

      public RMSProp(double initialLearningRate, double rho, double epsilon, double decay)
      Constructs an RMSProp gradient optimiser using the specified parameters.
      Parameters:
      initialLearningRate - The initial learning rate.
      rho - The momentum parameter.
      epsilon - The epsilon to ensure division stability.
      decay - The decay parameter.
    • RMSProp

      public RMSProp(double initialLearningRate, double rho)
      Constructs an RMSProp gradient optimiser using the specified parameters with epsilon set to 1e-8 and decay to 0.0.
      Parameters:
      initialLearningRate - The initial learning rate.
      rho - The momentum parameter.
  • Method Details

    • postConfig

      public void postConfig()
      Used by the OLCUT configuration system, and should not be called by external code.
      Specified by:
      postConfig in interface com.oracle.labs.mlrg.olcut.config.Configurable
    • initialise

      public void initialise(Parameters parameters)
      Description copied from interface: StochasticGradientOptimiser
      Initialises the gradient optimiser.

      Configures any learning rate parameters.

      Specified by:
      initialise in interface StochasticGradientOptimiser
      Parameters:
      parameters - The parameters to optimise.
    • step

      public Tensor[] step(Tensor[] updates, double weight)
      Description copied from interface: StochasticGradientOptimiser
      Take a Tensor array of gradients and transform them according to the current weight and learning rates.

      Can return the same Tensor array or a new one.

      Specified by:
      step in interface StochasticGradientOptimiser
      Parameters:
      updates - An array of gradients.
      weight - The weight for the current gradients.
      Returns:
      A Tensor array of gradients.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • reset

      public void reset()
      Description copied from interface: StochasticGradientOptimiser
      Resets the optimiser so it's ready to optimise a new Parameters.
      Specified by:
      reset in interface StochasticGradientOptimiser
    • copy

      public RMSProp copy()
      Description copied from interface: StochasticGradientOptimiser
      Copies a gradient optimiser with it's configuration. Usually calls the copy constructor.
      Specified by:
      copy in interface StochasticGradientOptimiser
      Returns:
      A gradient optimiser with the same configuration, but independent state.
    • getProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>