Class TfDataType


  • public final class TfDataType
    extends java.lang.Object
    Helper to convert between DataType an the TensorFlow internal DataTypes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ai.djl.ndarray.types.DataType fromTf​(int dataType)
      Converts a TensorFlow type value into a DataType.
      static int toTf​(ai.djl.ndarray.types.DataType dataType)
      Converts a DataType into the corresponding TensorFlow type value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toTf

        public static int toTf​(ai.djl.ndarray.types.DataType dataType)
        Converts a DataType into the corresponding TensorFlow type value.
        Parameters:
        dataType - the DataType to convert
        Returns:
        the converted TensorFlow type value
      • fromTf

        public static ai.djl.ndarray.types.DataType fromTf​(int dataType)
        Converts a TensorFlow type value into a DataType.
        Parameters:
        dataType - the TensorFlow type value to convert
        Returns:
        the DataType