neural_compressor.pruner.pruner_legacy.group_lasso

Group Lasso pruner.

Module Contents

Classes

GroupLassoPruner

Group Lasso pruner class.

class neural_compressor.pruner.pruner_legacy.group_lasso.GroupLassoPruner(model, local_config, global_config)

Bases: neural_compressor.pruner.pruner_legacy.magnitude.BasicMagnitudePruner

Group Lasso pruner class.

Parameters:
  • model (object) – The original model (currently PyTorchModel instance).

  • local_config (Conf) – configs specific for this pruning instance.

  • global_config (Conf) – global configs which may be overwritten by local_config.

on_before_optimizer_step()

Update gradient to prune the weights by back propagation.