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(
317317 model = quantized_model ,
318318 output_path = quantized_tflite_file ,
319319 is_quantized = True ,
320- input_quant_params = (0. , 1. ),
321- experimental_new_converter = True )
320+ input_quant_params = (0. , 1. ))
322321
323322 interpreter = tf .lite .Interpreter (model_path = quantized_tflite_file )
324323 interpreter .allocate_tensors ()
@@ -407,11 +406,7 @@ def testQuantizeSingleLayer_ProducesFullIntegerModel_TF1(
407406 is_quantized = True ,
408407 inference_type = tf .uint8 ,
409408 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. ))
415410
416411 # pylint: enable=g-complex-comprehension,undefined-variable
417412
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ def convert_keras_to_tflite(model,
2828 is_quantized = True ,
2929 inference_type = None ,
3030 inference_input_type = None ,
31- input_quant_params = (- 128. , 255. ),
32- experimental_new_converter = True ):
31+ input_quant_params = (- 128. , 255. )):
3332 """Convert Keras model to TFLite."""
3433 if custom_objects is None :
3534 custom_objects = {}
@@ -42,8 +41,6 @@ def convert_keras_to_tflite(model,
4241 converter = tf .lite .TFLiteConverter .from_keras_model_file (
4342 keras_file , custom_objects = custom_objects )
4443
45- converter .experimental_new_converter = experimental_new_converter
46-
4744 if is_quantized :
4845 if not compat .is_v1_apis ():
4946 converter .optimizations = [tf .lite .Optimize .DEFAULT ]
You can’t perform that action at this time.
0 commit comments