Explicitly disable new converter for "fully_quantize" testing code

PiperOrigin-RevId: 283401149
Change-Id: Ib3f36a4d45abb7660a1beb7f905ed798ae4ccf64
This commit is contained in:
Yu-Cheng Ling 2019-12-02 13:09:33 -08:00 committed by TensorFlower Gardener
parent 143e80f663
commit 60cc118870

View File

@ -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: