diff --git a/tensorflow/lite/portable_type_to_tflitetype.h b/tensorflow/lite/portable_type_to_tflitetype.h index fd502b851a6..9bfaf6b7409 100644 --- a/tensorflow/lite/portable_type_to_tflitetype.h +++ b/tensorflow/lite/portable_type_to_tflitetype.h @@ -16,8 +16,8 @@ limitations under the License. #define TENSORFLOW_LITE_PORTABLE_TYPE_TO_TFLITETYPE_H_ // Most of the definitions have been moved to this subheader so that Micro -// can include it without relying on , which isn't available on all -// platforms. +// can include it without relying on and , which isn't +// available on all platforms. // Arduino build defines abs as a macro here. That is invalid C++, and breaks // libc++'s header, undefine it. @@ -25,8 +25,6 @@ limitations under the License. #undef abs #endif -#include - #include "tensorflow/lite/c/common.h" namespace tflite { @@ -65,8 +63,6 @@ MATCH_TYPE_AND_TFLITE_TYPE(float, kTfLiteFloat32); MATCH_TYPE_AND_TFLITE_TYPE(unsigned char, kTfLiteUInt8); MATCH_TYPE_AND_TFLITE_TYPE(int8_t, kTfLiteInt8); MATCH_TYPE_AND_TFLITE_TYPE(bool, kTfLiteBool); -MATCH_TYPE_AND_TFLITE_TYPE(std::complex, kTfLiteComplex64); -MATCH_TYPE_AND_TFLITE_TYPE(std::complex, kTfLiteComplex128); MATCH_TYPE_AND_TFLITE_TYPE(TfLiteFloat16, kTfLiteFloat16); MATCH_TYPE_AND_TFLITE_TYPE(double, kTfLiteFloat64); MATCH_TYPE_AND_TFLITE_TYPE(uint64_t, kTfLiteUInt64); diff --git a/tensorflow/lite/type_to_tflitetype.h b/tensorflow/lite/type_to_tflitetype.h index 8409a299082..9334a2385a9 100644 --- a/tensorflow/lite/type_to_tflitetype.h +++ b/tensorflow/lite/type_to_tflitetype.h @@ -15,13 +15,14 @@ limitations under the License. #ifndef TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_ #define TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_ +#include #include #include "tensorflow/lite/c/common.h" // Most of the definitions have been moved to this subheader so that Micro -// can include it without relying on , which isn't available on all -// platforms. +// can include it without relying on and , which isn't +// available on all platforms. #include "tensorflow/lite/portable_type_to_tflitetype.h" namespace tflite { @@ -30,5 +31,8 @@ namespace tflite { // in a string tensor will be returned as a std::string, so it's deprecated. MATCH_TYPE_AND_TFLITE_TYPE(std::string, kTfLiteString); +MATCH_TYPE_AND_TFLITE_TYPE(std::complex, kTfLiteComplex64); +MATCH_TYPE_AND_TFLITE_TYPE(std::complex, kTfLiteComplex128); + } // namespace tflite #endif // TENSORFLOW_LITE_TYPE_TO_TFLITETYPE_H_