neural_compressor.compression.pruner.pruners
Pruning patterns.
Submodules
- neural_compressor.compression.pruner.pruners.base
- neural_compressor.compression.pruner.pruners.basic
- neural_compressor.compression.pruner.pruners.block_mask
- neural_compressor.compression.pruner.pruners.mha
- neural_compressor.compression.pruner.pruners.pattern_lock
- neural_compressor.compression.pruner.pruners.progressive
- neural_compressor.compression.pruner.pruners.retrain_free
Functions
Get all valid pruner names. |
|
|
Get registered pruner class. |
Package Contents
- neural_compressor.compression.pruner.pruners.parse_valid_pruner_types()[source]
Get all valid pruner names.
- neural_compressor.compression.pruner.pruners.get_pruner(config, modules, framework='pytorch')[source]
Get registered pruner class.
Get a Pruner object from PRUNERS.
- Parameters:
modules – A dict {“module_name”: Tensor} that stores the pruning modules’ weights.
config – A config dict object that contains the pruner information.
- Returns:
A Pruner object.
Raises: AssertionError: Currently only support pruners that have been registered in PRUNERS.