neural_compressor.pruner.pruner_legacy.pattern_lock
¶
Pattern lock pruner.
Module Contents¶
Classes¶
Pattern lock pruner class. |
- class neural_compressor.pruner.pruner_legacy.pattern_lock.PatternLockPruner(model, local_config, global_config)¶
Bases:
neural_compressor.pruner.pruner_legacy.pruner.Pruner
Pattern lock pruner class.
- Parameters:
- on_epoch_begin(epoch)¶
Be called on the beginning of epochs.
- on_step_begin(batch_id)¶
Be called on the beginning of steps.
- on_epoch_end()¶
Be called on the end of epochs.
- on_step_end()¶
Update weights.
- compute_mask()¶
Compute masks according to current sparsity pattern.
- update_weights()¶
Update weights according to the masks.