:orphan: :py:mod:`neural_compressor.tensorflow.quantization.config` ========================================================== .. py:module:: neural_compressor.tensorflow.quantization.config Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: neural_compressor.tensorflow.quantization.config.StaticQuantConfig neural_compressor.tensorflow.quantization.config.SmoothQuantConfig Functions ~~~~~~~~~ .. autoapisummary:: neural_compressor.tensorflow.quantization.config.get_default_static_quant_config neural_compressor.tensorflow.quantization.config.get_default_sq_config .. py:class:: StaticQuantConfig(weight_dtype: str = 'int8', weight_sym: bool = True, weight_granularity: str = 'per_tensor', weight_algorithm: str = 'minmax', act_dtype: str = 'int8', act_sym: bool = True, act_granularity: str = 'per_tensor', act_algorithm: str = 'minmax', white_list: Optional[List[neural_compressor.common.base_config.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST) Config class for tf static quantization. .. py:function:: get_default_static_quant_config() -> StaticQuantConfig Generate the default static quant config. :returns: the default tf config. .. py:class:: SmoothQuantConfig(alpha: float = 0.5, folding: bool = False, percentile: float = 99.999, op_types: list = ['MatMul', 'Conv2D'], scales_per_op: bool = True, record_max_info: bool = False, weight_clip: bool = True, auto_alpha_args: Dict = DEFAULT_SQ_ALPHA_ARGS, white_list: Optional[List[neural_compressor.common.base_config.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST) Config class for tf smooth quantization. .. py:function:: get_default_sq_config() -> SmoothQuantConfig Generate the default rtn config. :returns: the default smooth quant config.