public interface GradientUpdater extends Serializable
Modifier and Type | Method and Description |
---|---|
GradientUpdaterAggregator |
getAggregator(boolean addThis)
Deprecated.
Use Updater view array functionality instead
|
INDArray |
getGradient(INDArray gradient,
int iteration)
Modify the gradient
to be an update
|
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)
|
int stateSizeForInputSize(int inputSize)
inputSize
- Length of the input arrayvoid setStateViewArray(INDArray viewArray, int[] gradientShape, char gradientOrder, boolean initialize)
viewArray
- Array (that is a view of a larger array) to use for the state.gradientShape
- gradientOrder
- initialize
- If true: the updater must initialize the view array. If false: no change to view array contentsvoid update(Object... args)
args
- INDArray getGradient(INDArray gradient, int iteration)
gradient
- the gradient to modifyiteration
- @Deprecated GradientUpdaterAggregator getAggregator(boolean addThis)
addThis
- If true: return a GradientUpdaterAggregator with the GradientUpdater already added.
If false: return an empty (uninitialized) GradientUpdaterAggregatorCopyright © 2016. All Rights Reserved.