Class Momentum
java.lang.Object
org.tensorflow.framework.optimizers.Optimizer
org.tensorflow.framework.optimizers.Momentum
-
Nested Class Summary
Nested classes/interfaces inherited from class Optimizer
Optimizer.GradAndVar<T>, Optimizer.Options -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final Stringstatic final floatstatic final booleanFields inherited from class Optimizer
globals, graph, tf, VARIABLE_V2 -
Constructor Summary
ConstructorsConstructorDescriptionCreates a Momentum OptimizerCreates a Momentum OptimizerCreates a Momentum OptimizerCreates a Momentum OptimizerCreates a Momentum Optimizer -
Method Summary
Modifier and TypeMethodDescriptionapplyDense(Ops deps, Output<T> gradient, Output<T> variable) Generates the gradient update operations for the specific variable and gradient.protected voidcreateSlots(List<Output<? extends TType>> variables) Performs a No-op slot creation method.Get the Name of the optimizer.toString()Methods inherited from class Optimizer
applyGradients, computeGradients, createName, createSlot, finish, getSlot, getTF, minimize, minimize, prepare
-
Field Details
-
LEARNING_RATE_DEFAULT
public static final float LEARNING_RATE_DEFAULT- See Also:
-
MOMENTUM_DEFAULT
public static final float MOMENTUM_DEFAULT- See Also:
-
NESTEROV_DEFAULT
public static final boolean NESTEROV_DEFAULT- See Also:
-
MOMENTUM
- See Also:
-
-
Constructor Details
-
Momentum
-
Momentum
Creates a Momentum Optimizer- Parameters:
graph- the TensorFlow graphlearningRate- the learning rate
-
Momentum
Creates a Momentum Optimizer- Parameters:
graph- the TensorFlow graphlearningRate- the learning ratemomentum- hyperparameter that accelerates gradient descent in the relevant direction and dampens oscillations, Must be greater than or equal to zero. Default is 0.
-
Momentum
Creates a Momentum Optimizer- Parameters:
graph- the TensorFlow graphlearningRate- the learning ratemomentum- 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.
-
Momentum
Creates a Momentum Optimizer- Parameters:
graph- the TensorFlow graphname- the name for this OptimizerlearningRate- the learning ratemomentum- 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.
-
-
Method Details
-
createSlots
Performs a No-op slot creation method.- Overrides:
createSlotsin classOptimizer- Parameters:
variables- The variables to create slots for.
-
applyDense
Generates the gradient update operations for the specific variable and gradient.- Specified by:
applyDensein classOptimizer- Type Parameters:
T- The type of the variable.- Parameters:
gradient- The gradient to use.variable- The variable to update.- Returns:
- An operand which applies the desired optimizer update to the variable.
-
toString
-
getOptimizerName
Get the Name of the optimizer.- Specified by:
getOptimizerNamein classOptimizer- Returns:
- The optimizer name.
-