Package ai.djl.tensorflow.engine
Class TfDataType
- java.lang.Object
-
- ai.djl.tensorflow.engine.TfDataType
-
public final class TfDataType extends java.lang.ObjectHelper to convert betweenDataTypean the TensorFlow internal DataTypes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ai.djl.ndarray.types.DataTypefromTf(int dataType)Converts a TensorFlow type value into aDataType.static inttoTf(ai.djl.ndarray.types.DataType dataType)Converts aDataTypeinto the corresponding TensorFlow type value.
-
-
-
Method Detail
-
toTf
public static int toTf(ai.djl.ndarray.types.DataType dataType)
Converts aDataTypeinto the corresponding TensorFlow type value.- Parameters:
dataType- theDataTypeto convert- Returns:
- the converted TensorFlow type value
-
fromTf
public static ai.djl.ndarray.types.DataType fromTf(int dataType)
Converts a TensorFlow type value into aDataType.- Parameters:
dataType- the TensorFlow type value to convert- Returns:
- the
DataType
-
-