public class AdaGradUpdater extends Object implements GradientUpdater<AdaGrad>
| Modifier and Type | Field and Description |
|---|---|
static String |
GRAD_STATE |
INDArray |
historicalGradient |
protected double |
learningRate |
protected int |
numIterations |
int[] |
shape |
| Constructor and Description |
|---|
AdaGradUpdater(AdaGrad config) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyUpdater(INDArray gradient,
int iteration,
int epoch)
Gets feature specific learning rates
Adagrad keeps a history of gradients being passed in.
|
Map<String,INDArray> |
getState() |
void |
setState(Map<String,INDArray> stateMap,
boolean initialize) |
void |
setStateViewArray(INDArray viewArray,
long[] gradientShape,
char gradientOrder,
boolean initialize)
For the internal updater state (if any): set this to use the provided array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigpublic static final String GRAD_STATE
public INDArray historicalGradient
public int[] shape
protected double learningRate
protected int numIterations
public AdaGradUpdater(AdaGrad config)
public void setState(Map<String,INDArray> stateMap, boolean initialize)
setState in interface GradientUpdater<AdaGrad>public Map<String,INDArray> getState()
getState in interface GradientUpdater<AdaGrad>public void setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)
GradientUpdatersetStateViewArray in interface GradientUpdater<AdaGrad>viewArray - Array (that is a view of a larger array) to use for the state.initialize - If true: the updater must initialize the view array. If false: no change to view array contentspublic void applyUpdater(INDArray gradient, int iteration, int epoch)
applyUpdater in interface GradientUpdater<AdaGrad>gradient - the gradient to get learning rates foriteration - Copyright © 2021. All rights reserved.