public class AdaGrad extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
INDArray |
adjustedGradient |
protected boolean |
decayLr |
double |
fudgeFactor |
INDArray |
gradient |
INDArray |
historicalGradient |
protected double |
lrDecay |
protected double |
masterStepSize |
protected double |
minLearningRate |
protected int |
numIterations |
protected static long |
serialVersionUID |
int[] |
shape |
Constructor and Description |
---|
AdaGrad(int[] shape)
Create adagrad with the specified shape
|
AdaGrad(int rows,
int cols)
Initializes adagrad with a gamma of 1e-2
|
AdaGrad(int rows,
int cols,
double gamma) |
Modifier and Type | Method and Description |
---|---|
protected void |
createAdjustedGradient() |
protected void |
createHistoricalGradient() |
INDArray |
getLearningRates(INDArray gradient)
Gets feature specific learning rates
Adagrad keeps a history of gradients being passed in.
|
double |
getMasterStepSize() |
boolean |
isDecayLr() |
void |
setDecayLr(boolean decayLr) |
void |
setMasterStepSize(double masterStepSize) |
protected static final long serialVersionUID
protected double masterStepSize
public INDArray historicalGradient
public INDArray adjustedGradient
public double fudgeFactor
public INDArray gradient
public int[] shape
protected int numIterations
protected double lrDecay
protected boolean decayLr
protected double minLearningRate
public AdaGrad(int rows, int cols, double gamma)
public AdaGrad(int[] shape)
shape
- public AdaGrad(int rows, int cols)
rows
- the rows for the gradientscols
- the number of columns for the gradientprotected void createHistoricalGradient()
protected void createAdjustedGradient()
public INDArray getLearningRates(INDArray gradient)
gradient
- the gradient to getFromOrigin learning rates forpublic double getMasterStepSize()
public void setMasterStepSize(double masterStepSize)
public boolean isDecayLr()
public void setDecayLr(boolean decayLr)
Copyright © 2014. All Rights Reserved.