tensorflow/python/framework/dtypes.cc
// A variant of tensorflow::DataTypeString which uses fixed-width names
// for floating point data types. This behavior is compatible with that of
// existing pure Python DType.
A variant of tensorflow::DataTypeString which uses fixed-width names
for floating point data types. This behavior is compatible with that of
existing pure Python DType.
A variant of tensorflow :: DataTypeString which uses fixed - width names for floating point data types . This behavior is compatible with that of existing pure Python DType .
const std::string DataTypeStringCompat(tensorflow::DataType dt) {
  switch (dt) {
    case tensorflow::DataType::DT_HALF:
      return "float16";
    case tensorflow::DataType::DT_HALF_REF:
      return "float16_ref";
    case tensorflow::DataType::DT_FLOAT:
      return "float32";
    case tensorflow::DataType::DT_FLOAT_REF:
      return "float32_ref";
    case tensorflow::DataType::DT_DOUBLE:
      return "float64";
    case tensorflow::DataType::DT_DOUBLE_REF:
      return "float64_ref";
    default:
      return tensorflow::DataTypeString(dt);
  }
}
const std :: string DataTypeStringCompat ( tensorflow :: DataType dt ) { switch ( dt ) { case tensorflow :: DataType :: DT_HALF : return " " ; case tensorflow :: DataType :: DT_HALF_REF : return " " ; case tensorflow :: DataType :: DT_FLOAT : return " " ; case tensorflow :: DataType :: DT_FLOAT_REF : return " " ; case tensorflow :: DataType :: DT_DOUBLE : return " " ; case tensorflow :: DataType :: DT_DOUBLE_REF : return " " ; default : return tensorflow :: DataTypeString ( dt ) ; } }
A variant of tensorflow::DataTypeString which uses fixed-width names
for floating point data types.
A variant of tensorflow :: DataTypeString which uses fixed - width names for floating point data types .