public class AdaDelta extends Object implements Serializable, GradientUpdater
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 | Class and Description |
---|---|
static class |
AdaDelta.AdaDeltaAggregator |
Constructor and Description |
---|
AdaDelta(double rho) |
AdaDelta(double rho,
double epsilon) |
Modifier and Type | Method and Description |
---|---|
GradientUpdaterAggregator |
getAggregator(boolean addThis)
Get a GradientUpdaterAggregator.
|
INDArray |
getGradient(INDArray gradient,
int iteration)
Get the updated gradient for the given gradient
and also update the state of ada delta.
|
void |
setStateViewArray(INDArray viewArray,
int[] gradientShape,
char gradientOrder,
boolean initialize)
For the internal updater state (if any): set this to use the provided array.
|
int |
stateSizeForInputSize(int inputSize)
For a give input size (length) array, how big is the internal state?
Typically 0, 1 or 2x the input size, depending on the type of updater
|
void |
update(Object... args)
update(learningRate,momentum)
|
public AdaDelta(double rho)
public AdaDelta(double rho, double epsilon)
public int stateSizeForInputSize(int inputSize)
GradientUpdater
stateSizeForInputSize
in interface GradientUpdater
inputSize
- Length of the input arraypublic void setStateViewArray(INDArray viewArray, int[] gradientShape, char gradientOrder, boolean initialize)
GradientUpdater
setStateViewArray
in interface GradientUpdater
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 update(Object... args)
GradientUpdater
update
in interface GradientUpdater
public INDArray getGradient(INDArray gradient, int iteration)
getGradient
in interface GradientUpdater
gradient
- the gradient to get the
updated gradient foriteration
- public GradientUpdaterAggregator getAggregator(boolean addThis)
GradientUpdater
getAggregator
in interface GradientUpdater
addThis
- If true: return a GradientUpdaterAggregator with the GradientUpdater already added.
If false: return an empty (uninitialized) GradientUpdaterAggregatorCopyright © 2016. All Rights Reserved.