Class GradientDescent
java.lang.Object
org.tensorflow.framework.optimizers.Optimizer
org.tensorflow.framework.optimizers.GradientDescent
Basic Stochastic gradient descent optimizer. GradientDescent updates the current weight using the
current gradient ?L/?w multiplied by the learning rate.
-
Nested Class Summary
Nested classes/interfaces inherited from class Optimizer
Optimizer.GradAndVar<T>, Optimizer.Options -
Field Summary
FieldsFields inherited from class Optimizer
globals, graph, tf, VARIABLE_V2 -
Constructor Summary
ConstructorsConstructorDescriptionGradientDescent(Graph graph) Creates a GradientDescent OptimizerGradientDescent(Graph graph, float learningRate) Creates a GradientDescent OptimizerGradientDescent(Graph graph, String name, float learningRate) Creates a GradientDescent 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.Get the Name of the optimizer.toString()Methods inherited from class Optimizer
applyGradients, computeGradients, createName, createSlot, createSlots, finish, getSlot, getTF, minimize, minimize, prepare
-
Field Details
-
LEARNING_RATE_DEFAULT
public static final float LEARNING_RATE_DEFAULT- See Also:
-
-
Constructor Details
-
GradientDescent
Creates a GradientDescent Optimizer- Parameters:
graph- the TensorFlow graph
-
GradientDescent
Creates a GradientDescent Optimizer- Parameters:
graph- the TensorFlow graphlearningRate- the learning rate, defaults to 0.01
-
GradientDescent
-
-
Method Details
-
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.
-