neural_compressor.algorithm
¶
Fetch all files and init all algorithms.
Submodules¶
Package Contents¶
Classes¶
Build a dict for registered algorithms. |
|
The base class of algorithm. |
|
control the Algorithm in different phase. |
Functions¶
|
Decorate and register all Algorithm subclasses. |
- class neural_compressor.algorithm.ALGORITHMS¶
Bases:
object
Build a dict for registered algorithms.
- classmethod support_algorithms()¶
Get all algorithms.
- Returns:
A set of all algorithms.
- Return type:
Set
- class neural_compressor.algorithm.Algorithm¶
Bases:
object
The base class of algorithm.
- class neural_compressor.algorithm.AlgorithmScheduler(conf)¶
Bases:
object
control the Algorithm in different phase.
- property origin_model¶
Return the origin model.
- Returns:
The origin model.
- Return type:
model
- property q_model¶
Return the quantized model.
- Returns:
The quantized model.
- Return type:
model
- property dataloader¶
Return the dataloader.
- Returns:
The dataloader.
- Return type:
dataloader
- property adaptor¶
Return the adaptor.
- Returns:
The adaptor.
- Return type:
adaptor
- property calib_iter¶
Return the calibration iter number.
- Returns:
The calibration iter number.
- Return type:
calib_iter
- neural_compressor.algorithm.algorithm_registry(algorithm_type)¶
Decorate and register all Algorithm subclasses.
- Parameters:
cls (class) – The class of register.
algorithm_type (str) – The algorithm registration name
- Returns:
The class of register.
- Return type:
cls