Class AdaDeltaOptimizer
java.lang.Object
deepnetts.net.train.opt.AdaDeltaOptimizer
- All Implemented Interfaces:
Optimizer, TrainingListener, EventListener
Implementation of ADADELTA which is a modification of AdaGrad that uses only a limited window of previous gradients.
Warning: Implementation of this optimizer is experimental and still unstable.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatcalculateDeltaBias(float grad, int idx) calculateDeltaBias(Tensor1D grad) floatcalculateDeltaWeight(float grad, int... idxs) Smoothing term to prevent division by zero if sqr grad sum becomes zero 1e-8 should be also tried https://d2l.ai/chapter_optimization/adagrad.html 1e-6 The value to use is 1e-6, 1e-8, Keras uses 1e-7 for adamvoidhandleEvent(TrainingEvent event) Invoked when a training event occurs.voidsetLearningRate(float learningRate)
-
Constructor Details
-
AdaDeltaOptimizer
-
-
Method Details
-
calculateDeltaWeight
public float calculateDeltaWeight(float grad, int... idxs) Description copied from interface:OptimizerSmoothing term to prevent division by zero if sqr grad sum becomes zero 1e-8 should be also tried https://d2l.ai/chapter_optimization/adagrad.html 1e-6 The value to use is 1e-6, 1e-8, Keras uses 1e-7 for adam- Specified by:
calculateDeltaWeightin interfaceOptimizer
-
calculateDeltaBias
public float calculateDeltaBias(float grad, int idx) - Specified by:
calculateDeltaBiasin interfaceOptimizer
-
handleEvent
Description copied from interface:TrainingListenerInvoked when a training event occurs.- Specified by:
handleEventin interfaceTrainingListener- Parameters:
event- the training event
-
setLearningRate
public void setLearningRate(float learningRate) - Specified by:
setLearningRatein interfaceOptimizer
-
calculateDeltaWeight
- Specified by:
calculateDeltaWeightin interfaceOptimizer
-
calculateDeltaBias
- Specified by:
calculateDeltaBiasin interfaceOptimizer
-