Package engine.neural.optimizers
Class SGDMomentum
java.lang.Object
engine.neural.optimizers.SGDMomentum
- All Implemented Interfaces:
Optimizer,Reconstructible
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatprivate final floatprivate IdentityHashMap<Vector, Vector> Store velocity matrix based off of which vector is givenprivate IdentityHashMap<Matrix, Matrix> Store velocity matrix based off of which matrix is given -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis interface is used to save objects as strings and to reconstruct them latervoidupdateBiases(Vector biases, Vector delta) voidupdateWeights(Matrix weights, Matrix gradient)
-
Field Details
-
learningRate
private final float learningRate -
momentum
private final float momentum -
velocityWeights
Store velocity matrix based off of which matrix is given -
velocityBiases
Store velocity matrix based off of which vector is given
-
-
Constructor Details
-
SGDMomentum
public SGDMomentum(float learningRate, float momentum)
-
-
Method Details
-
updateWeights
- Specified by:
updateWeightsin interfaceOptimizer
-
updateBiases
- Specified by:
updateBiasesin interfaceOptimizer
-
getClassInfo
Description copied from interface:ReconstructibleThis interface is used to save objects as strings and to reconstruct them later- Specified by:
getClassInfoin interfaceReconstructible- 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;"
-