public interface IUpdater extends Serializable, Cloneable
GradientUpdater
Modifier and Type | Method and Description |
---|---|
IUpdater |
clone()
Clone the updater
|
boolean |
equals(Object updater) |
double |
getLearningRate(int iteration,
int epoch)
Get the learning rate - if any - for the updater, at the specified iteration and epoch.
|
boolean |
hasLearningRate() |
GradientUpdater |
instantiate(INDArray viewArray,
boolean initializeViewArray)
Create a new gradient updater
|
GradientUpdater |
instantiate(Map<String,INDArray> updaterState,
boolean initializeStateArrays) |
void |
setLrAndSchedule(double lr,
ISchedule lrSchedule)
Set the learning rate and schedule.
|
long |
stateSize(long numParams)
Determine the updater state size for the given number of parameters.
|
long stateSize(long numParams)
numParams
- Number of parametersGradientUpdater instantiate(INDArray viewArray, boolean initializeViewArray)
viewArray
- The updater state size view awayinitializeViewArray
- If true: initialise the updater stateGradientUpdater instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)
IUpdater clone()
double getLearningRate(int iteration, int epoch)
iteration
- Iteration at which to get the learning rateepoch
- Epoch at which to get the learning rateboolean hasLearningRate()
void setLrAndSchedule(double lr, ISchedule lrSchedule)
hasLearningRate()
returns false.lr
- Learning rate to set (typically not used if LR schedule is non-null)lrSchedule
- Learning rate schedule to set (may be null)Copyright © 2020. All rights reserved.