26 case tflite::TensorType_FLOAT32:
27 return tflchef::FLOAT32;
28 case tflite::TensorType_INT32:
29 return tflchef::INT32;
30 case tflite::TensorType_INT64:
31 return tflchef::INT64;
32 case tflite::TensorType_UINT8:
33 return tflchef::UINT8;
34 case tflite::TensorType_BOOL:
36 case tflite::TensorType_INT8:
38 case tflite::TensorType_INT16:
39 return tflchef::INT16;
40 case tflite::TensorType_FLOAT16:
41 return tflchef::FLOAT16;
46 throw std::runtime_error{
"unsupported tensor type"};
54 case tflite::ActivationFunctionType_NONE:
56 case tflite::ActivationFunctionType_RELU:
58 case tflite::ActivationFunctionType_RELU_N1_TO_1:
59 return tflchef::RELU_N1_TO_1;
60 case tflite::ActivationFunctionType_RELU6:
61 return tflchef::RELU6;
62 case tflite::ActivationFunctionType_TANH:
64 case tflite::ActivationFunctionType_SIGN_BIT:
65 return tflchef::SIGN_BIT;
67 throw std::runtime_error{
"unsupported activation type"};
114 case tflite::SparseIndexVector_NONE:
115 return tflchef::SparseIndexVecType::SparseIdxVecType_NONE;
116 case tflite::SparseIndexVector_Int32Vector:
117 return tflchef::SparseIndexVecType::INT32VEC;
118 case tflite::SparseIndexVector_Uint16Vector:
119 return tflchef::SparseIndexVecType::UINT16VEC;
120 case tflite::SparseIndexVector_Uint8Vector:
121 return tflchef::SparseIndexVecType::UINT8VEC;
123 throw std::runtime_error(
"unsupported sparse index vector type");