Class Optimizer.GradAndVar<T extends TType>

java.lang.Object
org.tensorflow.framework.optimizers.Optimizer.GradAndVar<T>
Type Parameters:
T - the data type for the gradient and variable
Enclosing class:
Optimizer

public static class Optimizer.GradAndVar<T extends TType> extends Object
A class that holds a paired gradient and variable.
  • Constructor Details

    • GradAndVar

      public GradAndVar(Output<T> gradient, Output<T> variable)
      Creates a Gradient and Variable pair
      Parameters:
      gradient - the gradient
      variable - the variable
  • Method Details

    • getGradient

      public Output<T> getGradient()
      Gets the gradient
      Returns:
      the gradient
    • getVariable

      public Output<T> getVariable()
      Gets the variable
      Returns:
      the variable