11 #ifndef HIPIPE_TENSORFLOW_UTILITY_TO_TF_TYPE_HPP
12 #define HIPIPE_TENSORFLOW_UTILITY_TO_TF_TYPE_HPP
14 #include "tensorflow/core/framework/tensor.h"
16 namespace hipipe::tensorflow {
18 constexpr
auto to_tf_type(
bool)
20 return ::tensorflow::DT_BOOL;
23 constexpr
auto to_tf_type(
float)
25 return ::tensorflow::DT_FLOAT;
28 constexpr
auto to_tf_type(
double)
30 return ::tensorflow::DT_DOUBLE;
33 constexpr
auto to_tf_type(std::int8_t)
35 return ::tensorflow::DT_INT8;
38 constexpr
auto to_tf_type(std::int16_t)
40 return ::tensorflow::DT_INT16;
43 constexpr
auto to_tf_type(std::int32_t)
45 return ::tensorflow::DT_INT32;
48 constexpr
auto to_tf_type(std::int64_t)
50 return ::tensorflow::DT_INT64;
53 constexpr
auto to_tf_type(std::uint8_t)
55 return ::tensorflow::DT_UINT8;
58 constexpr
auto to_tf_type(std::uint16_t)
60 return ::tensorflow::DT_UINT16;
63 auto to_tf_type(std::string)
65 return ::tensorflow::DT_STRING;