Explicitly disable new converter for "fully_quantize" testing code
PiperOrigin-RevId: 283401149 Change-Id: Ib3f36a4d45abb7660a1beb7f905ed798ae4ccf64
This commit is contained in:
parent
143e80f663
commit
60cc118870
@ -112,9 +112,16 @@ def toco_convert(options, graph_def, input_tensors, output_tensors, **kwargs):
|
|||||||
graphdef_file.flush()
|
graphdef_file.flush()
|
||||||
|
|
||||||
input_shapes = zip_test_utils.get_input_shapes_map(input_tensors)
|
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)
|
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):
|
def representative_dataset(input_tensors):
|
||||||
calibration_inputs = []
|
calibration_inputs = []
|
||||||
for _, shape, _ in input_tensors:
|
for _, shape, _ in input_tensors:
|
||||||
|
Loading…
Reference in New Issue
Block a user