Class SGDMomentum

java.lang.Object
engine.neural.optimizers.SGDMomentum
All Implemented Interfaces:
Optimizer, Reconstructible

public class SGDMomentum extends Object implements Optimizer
  • Field Details

    • learningRate

      private final float learningRate
    • momentum

      private final float momentum
    • velocityWeights

      private IdentityHashMap<Matrix,Matrix> velocityWeights
      Store velocity matrix based off of which matrix is given
    • velocityBiases

      private IdentityHashMap<Vector,Vector> velocityBiases
      Store velocity matrix based off of which vector is given
  • Constructor Details

    • SGDMomentum

      public SGDMomentum(float learningRate, float momentum)
  • Method Details

    • updateWeights

      public void updateWeights(Matrix weights, Matrix gradient)
      Specified by:
      updateWeights in interface Optimizer
    • updateBiases

      public void updateBiases(Vector biases, Vector delta)
      Specified by:
      updateBiases in interface Optimizer
    • getClassInfo

      public String getClassInfo()
      Description copied from interface: Reconstructible
      This interface is used to save objects as strings and to reconstruct them later
      Specified by:
      getClassInfo in interface Reconstructible
      Returns:
      a String in the utilizing getClass().getName() and then all following variables should be formatted with a new line before the raw value. Example: "return this.getClass().getName() + "\n" + this.param1 + "\n" + this.param2;"