public class AdaDeltaUpdater extends Object implements GradientUpdater<AdaDelta>
Ada delta updater. More robust adagrad that keeps track of a moving window average of the gradient rather than the every decaying learning rates of adagrad
Modifier and Type | Field and Description |
---|---|
static String |
MSDX_STATE |
static String |
MSG_STATE |
Constructor and Description |
---|
AdaDeltaUpdater(AdaDelta config) |
Modifier and Type | Method and Description |
---|---|
void |
applyUpdater(INDArray gradient,
int iteration,
int epoch)
Get the updated gradient for the given gradient
and also update the state of ada delta.
|
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, wait
getConfig
public static final String MSG_STATE
public static final String MSDX_STATE
public AdaDeltaUpdater(AdaDelta config)
public void setState(Map<String,INDArray> stateMap, boolean initialize)
setState
in interface GradientUpdater<AdaDelta>
public Map<String,INDArray> getState()
getState
in interface GradientUpdater<AdaDelta>
public void setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)
GradientUpdater
setStateViewArray
in interface GradientUpdater<AdaDelta>
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<AdaDelta>
gradient
- the gradient to get the
updated gradient foriteration
- Copyright © 2020. All rights reserved.