public class AMSGradUpdater extends Object implements GradientUpdater<AMSGrad>
Modifier and Type | Field and Description |
---|---|
static String |
M_STATE |
static String |
V_HAT_STATE |
static String |
V_STATE |
Constructor and Description |
---|
AMSGradUpdater(AMSGrad config) |
Modifier and Type | Method and Description |
---|---|
void |
applyUpdater(INDArray gradient,
int iteration,
int epoch)
Modify the gradient to be an update.
|
Map<String,INDArray> |
getState() |
void |
setState(@NonNull 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 M_STATE
public static final String V_STATE
public static final String V_HAT_STATE
public AMSGradUpdater(AMSGrad config)
public void setState(@NonNull @NonNull Map<String,INDArray> stateMap, boolean initialize)
setState
in interface GradientUpdater<AMSGrad>
public Map<String,INDArray> getState()
getState
in interface GradientUpdater<AMSGrad>
public void setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)
GradientUpdater
setStateViewArray
in interface GradientUpdater<AMSGrad>
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)
GradientUpdater
applyUpdater
in interface GradientUpdater<AMSGrad>
gradient
- the gradient to modifyCopyright © 2020. All rights reserved.