Package ai.djl.tensorflow.engine
Class TfDataType
java.lang.Object
ai.djl.tensorflow.engine.TfDataType
Helper to convert between
DataType an the TensorFlow internal DataTypes.-
Method Summary
-
Method Details
-
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
-