public class AdaGrad extends Object implements Serializable, GradientUpdater
Modifier and Type | Class and Description |
---|---|
static class |
AdaGrad.AdaGradAggregator |
Modifier and Type | Field and Description |
---|---|
INDArray |
historicalGradient |
protected double |
learningRate |
protected int |
numIterations |
int[] |
shape |
Constructor and Description |
---|
AdaGrad(double learningRate) |
AdaGrad(int[] shape,
double learningRate) |
AdaGrad(int rows,
int cols) |
AdaGrad(int rows,
int cols,
double learningRate) |
Modifier and Type | Method and Description |
---|---|
AdaGrad |
createSubset(int index) |
GradientUpdaterAggregator |
getAggregator(boolean addThis)
Get a GradientUpdaterAggregator.
|
double |
getGradient(double gradient,
int column,
int[] shape) |
INDArray |
getGradient(INDArray gradient,
int iteration)
Gets feature specific learning rates
Adagrad keeps a history of gradients being passed in.
|
INDArray |
getGradient(INDArray gradient,
int slice,
int[] shape) |
void |
update(Object... args)
update(learningRate,momentum)
|
public INDArray historicalGradient
public int[] shape
protected double learningRate
protected int numIterations
public AdaGrad(int rows, int cols, double learningRate)
rows
- cols
- learningRate
- public AdaGrad(int rows, int cols)
public AdaGrad(int[] shape, double learningRate)
public AdaGrad(double learningRate)
public 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 learning rates foriteration
- public double getGradient(double gradient, int column, int[] shape)
public AdaGrad createSubset(int index)
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.