From 60cc1188702598e5284698bf890fc18f15e2c27f Mon Sep 17 00:00:00 2001 From: Yu-Cheng Ling Date: Mon, 2 Dec 2019 13:09:33 -0800 Subject: [PATCH] Explicitly disable new converter for "fully_quantize" testing code PiperOrigin-RevId: 283401149 Change-Id: Ib3f36a4d45abb7660a1beb7f905ed798ae4ccf64 --- tensorflow/lite/testing/toco_convert.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tensorflow/lite/testing/toco_convert.py b/tensorflow/lite/testing/toco_convert.py index f4072b241a0..3e8a489c5f8 100644 --- a/tensorflow/lite/testing/toco_convert.py +++ b/tensorflow/lite/testing/toco_convert.py @@ -112,9 +112,16 @@ def toco_convert(options, graph_def, input_tensors, output_tensors, **kwargs): graphdef_file.flush() input_shapes = zip_test_utils.get_input_shapes_map(input_tensors) - converter = tf.compat.v1.lite.TocoConverter.from_frozen_graph( + converter = tf.compat.v1.lite.TFLiteConverter.from_frozen_graph( graphdef_file.name, input_arrays, output_tensors, input_shapes) + # TODO(b/145313371): Evaluate should we make it work with the new + # converter. + # Note: Currently this line is a non-functional change because the new + # converter is disabled by default. Since this code path doesn't work + # with new converter yet, it's explicitly disabled for easier testing. + converter.experimental_new_converter = False + def representative_dataset(input_tensors): calibration_inputs = [] for _, shape, _ in input_tensors: