neural_compressor.experimental.pytorch_pruner.pruning

Pruning module.

Module Contents

Classes

Pruning

Pruning.

class neural_compressor.experimental.pytorch_pruner.pruning.Pruning(config)[source]

Pruning.

The main class that users will used in codes to do pruning. Contain at least one Pruner object.

Parameters:

config – a string. The path to a config file. For config file template, please refer to https://github.com/intel/neural-compressor/tree/master/examples/pytorch/nlp/huggingface_models/text-classification/pruning/pytorch_pruner/eager/

model[source]

The model object to prune.

config_file_path[source]

A string. The path to a config file.

pruners[source]

A list. A list of Pruner objects.

pruner_info[source]

A config dict object. Contains pruners’ information.