Class CastHelper

java.lang.Object
org.tensorflow.framework.utils.CastHelper

public class CastHelper extends Object
A helper class for casting an Operand
  • Constructor Details

    • CastHelper

      public CastHelper()
  • Method Details

    • cast

      public static <T extends TType, U extends TType> Operand<T> cast(Ops tf, Operand<U> value, Class<T> requiredType)
      Casts an operand to the desired type.
      Type Parameters:
      T - the required data type
      U - the original data type of the value
      Parameters:
      tf - The TensorFlow Ops
      value - the value to be cast
      requiredType - the required data type
      Returns:
      the value cast to the required data type.