Class SGD

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

public class SGD extends Object implements Optimizer
  • Field Details

    • learningRate

      private final float learningRate
  • Constructor Details

    • SGD

      public SGD(float learningRate)
  • 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;"