@@ -64,7 +64,7 @@ def __init__(
6464 inference_output_type = None ,
6565 supported_ops = None ,
6666 supported_types = None ,
67- _experimental_new_quantizer = None ,
67+ experimental_new_quantizer = None ,
6868 ):
6969 """Constructs QuantizationConfig.
7070
@@ -87,7 +87,7 @@ def __init__(
8787 Supported values are types exported by lite.constants. Frequently, an
8888 optimization choice is driven by the most compact (i.e. smallest) type
8989 in this list (default [constants.FLOAT]).
90- _experimental_new_quantizer : Whether to enable experimental new quantizer.
90+ experimental_new_quantizer : Whether to enable experimental new quantizer.
9191 """
9292
9393 if optimizations is None :
@@ -112,7 +112,7 @@ def __init__(
112112 supported_types = [supported_types ]
113113 self .supported_types = supported_types
114114
115- self ._experimental_new_quantizer = _experimental_new_quantizer
115+ self .experimental_new_quantizer = experimental_new_quantizer
116116
117117 @classmethod
118118 def create_dynamic_range_quantization (cls ,
@@ -198,6 +198,6 @@ def get_converter_with_quantization(self, converter, preprocess=None):
198198 if self .supported_types :
199199 converter .target_spec .supported_types = self .supported_types
200200
201- if self ._experimental_new_quantizer is not None :
202- converter ._experimental_new_quantizer = self ._experimental_new_quantizer # pylint: disable=protected-access
201+ if self .experimental_new_quantizer is not None :
202+ converter .experimental_new_quantizer = self .experimental_new_quantizer
203203 return converter
0 commit comments