public class
Momentum
Stochastic gradient descent plus momentum, either nesterov or traditional.
See the paper for details of nesterov momentum.
Constants
float | LEARNING_RATE_DEFAULT | |
String | MOMENTUM | |
float | MOMENTUM_DEFAULT | |
boolean | NESTEROV_DEFAULT |
Inherited Constants
Public Constructors
Public Methods
String |
getOptimizerName()
Get the Name of the optimizer.
|
String |
toString()
|
Inherited Methods
Constants
public static final float LEARNING_RATE_DEFAULT
Constant Value:
0.01
public static final String MOMENTUM
Constant Value:
"momentum"
public static final float MOMENTUM_DEFAULT
Constant Value:
0.0
public static final boolean NESTEROV_DEFAULT
Constant Value:
false
Public Constructors
public Momentum (Graph graph, float learningRate)
Creates a Momentum Optimizer
Parameters
graph | the TensorFlow graph |
---|---|
learningRate | the learning rate |
public Momentum (Graph graph, float learningRate, float momentum)
Creates a Momentum Optimizer
Parameters
graph | the TensorFlow graph |
---|---|
learningRate | the learning rate |
momentum | hyperparameter that accelerates gradient descent in the relevant direction and dampens oscillations, Must be greater than or equal to zero. Default is 0. |
public Momentum (Graph graph, float learningRate, float momentum, boolean useNesterov)
Creates a Momentum Optimizer
Parameters
graph | the TensorFlow graph |
---|---|
learningRate | the learning rate |
momentum | hyperparameter that accelerates gradient descent in the relevant direction and dampens oscillations, Must be greater than or equal to zero. Default is 0. |
useNesterov | Whether to apply Nesterov momentum. Defaults to false. |
public Momentum (Graph graph, String name, float learningRate, float momentum, boolean useNesterov)
Creates a Momentum Optimizer
Parameters
graph | the TensorFlow graph |
---|---|
name | the name for this Optimizer |
learningRate | the learning rate |
momentum | hyperparameter that accelerates gradient descent in the relevant direction and dampens oscillations, Must be greater than or equal to zero. Default is 0. |
useNesterov | Whether to apply Nesterov momentum. Defaults to false. |
Public Methods
public String getOptimizerName ()
Get the Name of the optimizer.
Returns
- The optimizer name.
public String toString ()