neural_compressor.tensorflow.keras.quantization.config

The configs of algorithms for Keras.

Classes

OperatorConfig

The config for operator.

StaticQuantConfig

Config class for keras static quantization.

Functions

get_all_registered_configs(→ Dict[str, ...)

Get all registered configs for keras framework.

get_default_static_quant_config(→ StaticQuantConfig)

Generate the default static quant config.

Module Contents

class neural_compressor.tensorflow.keras.quantization.config.OperatorConfig[source]

The config for operator.

class neural_compressor.tensorflow.keras.quantization.config.StaticQuantConfig(weight_dtype: str = 'int8', weight_sym: bool = True, weight_granularity: str = 'per_tensor', act_dtype: str = 'int8', act_sym: bool = True, act_granularity: str = 'per_tensor', white_list: List[neural_compressor.common.base_config.OP_NAME_OR_MODULE_TYPE] | None = DEFAULT_WHITE_LIST)[source]

Config class for keras static quantization.

neural_compressor.tensorflow.keras.quantization.config.get_all_registered_configs() Dict[str, neural_compressor.common.base_config.BaseConfig][source]

Get all registered configs for keras framework.

neural_compressor.tensorflow.keras.quantization.config.get_default_static_quant_config() StaticQuantConfig[source]

Generate the default static quant config.

Returns:

the default keras config.