public class AdaMax extends Object implements IUpdater
| Modifier and Type | Class and Description |
|---|---|
static class |
AdaMax.Builder |
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_ADAMAX_BETA1_MEAN_DECAY |
static double |
DEFAULT_ADAMAX_BETA2_VAR_DECAY |
static double |
DEFAULT_ADAMAX_EPSILON |
static double |
DEFAULT_ADAMAX_LEARNING_RATE |
| Constructor and Description |
|---|
AdaMax() |
AdaMax(double learningRate) |
AdaMax(double learningRate,
double beta1,
double beta2,
double epsilon) |
AdaMax(ISchedule learningRateSchedule) |
| Modifier and Type | Method and Description |
|---|---|
IUpdater |
clone()
Clone the 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.
|
public static final double DEFAULT_ADAMAX_LEARNING_RATE
public static final double DEFAULT_ADAMAX_EPSILON
public static final double DEFAULT_ADAMAX_BETA1_MEAN_DECAY
public static final double DEFAULT_ADAMAX_BETA2_VAR_DECAY
public AdaMax()
public AdaMax(double learningRate)
public AdaMax(ISchedule learningRateSchedule)
public AdaMax(double learningRate,
double beta1,
double beta2,
double epsilon)
public long stateSize(long numParams)
IUpdaterpublic GradientUpdater instantiate(INDArray viewArray, boolean initializeViewArray)
IUpdaterinstantiate in interface IUpdaterviewArray - The updater state size view awayinitializeViewArray - If true: initialise the updater statepublic GradientUpdater instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)
instantiate in interface IUpdaterpublic double getLearningRate(int iteration,
int epoch)
IUpdatergetLearningRate in interface IUpdateriteration - Iteration at which to get the learning rateepoch - Epoch at which to get the learning ratepublic boolean hasLearningRate()
hasLearningRate in interface IUpdaterpublic void setLrAndSchedule(double lr,
ISchedule lrSchedule)
IUpdaterIUpdater.hasLearningRate() returns false.setLrAndSchedule in interface IUpdaterlr - Learning rate to set (typically not used if LR schedule is non-null)lrSchedule - Learning rate schedule to set (may be null)Copyright © 2021. All rights reserved.