neural_compressor.conf.config

Module Contents

Classes

PrunerV2

Similar to torch optimizer's interface.

Conf

Config parser.

Quantization_Conf

Config parser.

Pruning_Conf

Config parser.

Graph_Optimization_Conf

Config parser.

MixedPrecision_Conf

Config parser.

Benchmark_Conf

Config parser.

Distillation_Conf

Config parser.

NASConfig

Config parser.

DefaultConf

Access yaml using attributes instead of using the dictionary notation.

class neural_compressor.conf.config.PrunerV2(target_sparsity=None, pruning_type=None, pattern=None, op_names=None, excluded_op_names=None, start_step=None, end_step=None, pruning_scope=None, pruning_frequency=None, min_sparsity_ratio_per_op=None, max_sparsity_ratio_per_op=None, sparsity_decay_type=None, pruning_op_types=None, reg_type=None, criterion_reduce_type=None, parameters=None, resume_from_pruned_checkpoint=None)[source]

Similar to torch optimizer’s interface.

class neural_compressor.conf.config.Conf(cfg_fname)[source]

Config parser.

Parameters:

cfg_fname (string) – The path to the configuration file.

class neural_compressor.conf.config.Quantization_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.Pruning_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.Graph_Optimization_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.MixedPrecision_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.Benchmark_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.Distillation_Conf(cfg=None)[source]

Config parser.

Parameters:

cfg – The path to the configuration file or DotDict object or None.

class neural_compressor.conf.config.NASConfig(approach=None, search_space=None, search_algorithm=None)[source]

Config parser.

Parameters:
  • approach – The approach of the NAS.

  • search_algorithm – The search algorithm for NAS procedure.

class neural_compressor.conf.config.DefaultConf(value=None)[source]

Access yaml using attributes instead of using the dictionary notation.

Parameters:

value (dict) – The dict object to access.