Fix TFLite tests quantization check

PiperOrigin-RevId: 348674459
Change-Id: Ie88c199e7d78b9f1b7a85554adb70cafa196c362
This commit is contained in:
Karim Nosir 2020-12-22 12:19:30 -08:00 committed by TensorFlower Gardener
parent bca32a2148
commit 6119b93daf
2 changed files with 2 additions and 4 deletions

View File

@ -231,7 +231,6 @@ cc_library(
":split",
":test_runner",
"@com_google_absl//absl/strings",
"//tensorflow/lite/c:common",
"//tensorflow/lite:builtin_op_data",
"//tensorflow/lite:framework",
"//tensorflow/lite:string_util",
@ -240,7 +239,7 @@ cc_library(
"//tensorflow/lite/kernels:reference_ops",
"//tensorflow/lite/kernels:test_delegate_providers_lib",
"//tensorflow/lite/kernels/hashtable:hashtable_op_kernels",
"//tensorflow/lite/kernels/parse_example",
"//tensorflow/lite/kernels/parse_example:parse_example",
"//tensorflow/lite/kernels/perception:perception_ops",
"//tensorflow/lite/tools/evaluation:utils",
] + select({

View File

@ -21,7 +21,6 @@ limitations under the License.
#include "absl/strings/escaping.h"
#include "tensorflow/lite/builtin_op_data.h"
#include "tensorflow/lite/c/common.h"
#if !defined(__APPLE__)
#include "tensorflow/lite/delegates/flex/delegate.h"
#endif
@ -82,7 +81,7 @@ unique_void_ptr make_type_erased_array(size_t size) {
}
bool IsQuantized(const TfLiteTensor& tensor) {
if (tensor.quantization.type == kTfLiteNoQuantization) return false;
if (tensor.type != kTfLiteInt8 && tensor.type != kTfLiteInt16) return false;
if (tensor.quantization.params != nullptr) {
auto* quantization =