File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
tensorflow_model_optimization/python/core/quantization/keras Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,7 @@ def testQuantizeSingleLayer_ProducesFullIntegerModel_TF2(
317
317
model = quantized_model ,
318
318
output_path = quantized_tflite_file ,
319
319
is_quantized = True ,
320
- input_quant_params = (0. , 1. ),
321
- experimental_new_converter = True )
320
+ input_quant_params = (0. , 1. ))
322
321
323
322
interpreter = tf .lite .Interpreter (model_path = quantized_tflite_file )
324
323
interpreter .allocate_tensors ()
@@ -407,11 +406,7 @@ def testQuantizeSingleLayer_ProducesFullIntegerModel_TF1(
407
406
is_quantized = True ,
408
407
inference_type = tf .uint8 ,
409
408
inference_input_type = tf .uint8 ,
410
- input_quant_params = (0. , 1. ),
411
- # Set to False to throw errors when FakeQuants are
412
- # not placed everywhere to create full-integer model. Errors
413
- # are not thrown when set to True.
414
- experimental_new_converter = False )
409
+ input_quant_params = (0. , 1. ))
415
410
416
411
# pylint: enable=g-complex-comprehension,undefined-variable
417
412
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ def convert_keras_to_tflite(model,
28
28
is_quantized = True ,
29
29
inference_type = None ,
30
30
inference_input_type = None ,
31
- input_quant_params = (- 128. , 255. ),
32
- experimental_new_converter = True ):
31
+ input_quant_params = (- 128. , 255. )):
33
32
"""Convert Keras model to TFLite."""
34
33
if custom_objects is None :
35
34
custom_objects = {}
@@ -42,8 +41,6 @@ def convert_keras_to_tflite(model,
42
41
converter = tf .lite .TFLiteConverter .from_keras_model_file (
43
42
keras_file , custom_objects = custom_objects )
44
43
45
- converter .experimental_new_converter = experimental_new_converter
46
-
47
44
if is_quantized :
48
45
if not compat .is_v1_apis ():
49
46
converter .optimizations = [tf .lite .Optimize .DEFAULT ]
You can’t perform that action at this time.
0 commit comments