neural_compressor.ux.utils.workload.pruning

Configuration pruning module.

Module Contents

Classes

SGDOptimizer

Configuration SGDOptimizer class.

AdamWOptimizer

Configuration AdamWOptimizer class.

AdamOptimizer

Configuration AdamOptimizer class.

Optimizer

Configuration Optimizer class.

CrossEntropyLossCriterion

Configuration CrossEntropyLossCriterion class.

SparseCategoricalCrossentropyCriterion

Configuration SparseCategoricalCrossentropyCriterion class.

KnowledgeDistillationLossCriterion

Configuration KnowledgeDistillationLossCriterion class.

IntermediateLayersKnowledgeDistillationLoss

Configuration IntermediateLayersKnowledgeDistillationLoss class.

SelfKnowledgeDistillationLoss

Configuration SelfKnowledgeDistillationLoss class.

Criterion

Configuration Criterion class.

Train

Configuration Train class.

WeightCompressionApproach

Configuration WeightCompressionApproach class.

Approach

Configuration Approach class.

Pruning

Configuration Pruning class.

Functions

parse_dict_value_to_float(→ Optional[float])

Parse value to float or None if value is None.

parse_dict_value_to_int(→ Optional[int])

Parse value to float or None if value is None.

class neural_compressor.ux.utils.workload.pruning.SGDOptimizer(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration SGDOptimizer class.

class neural_compressor.ux.utils.workload.pruning.AdamWOptimizer(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration AdamWOptimizer class.

class neural_compressor.ux.utils.workload.pruning.AdamOptimizer(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration AdamOptimizer class.

class neural_compressor.ux.utils.workload.pruning.Optimizer(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration Optimizer class.

class neural_compressor.ux.utils.workload.pruning.CrossEntropyLossCriterion(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration CrossEntropyLossCriterion class.

class neural_compressor.ux.utils.workload.pruning.SparseCategoricalCrossentropyCriterion(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration SparseCategoricalCrossentropyCriterion class.

class neural_compressor.ux.utils.workload.pruning.KnowledgeDistillationLossCriterion(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration KnowledgeDistillationLossCriterion class.

class neural_compressor.ux.utils.workload.pruning.IntermediateLayersKnowledgeDistillationLoss(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration IntermediateLayersKnowledgeDistillationLoss class.

class neural_compressor.ux.utils.workload.pruning.SelfKnowledgeDistillationLoss(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration SelfKnowledgeDistillationLoss class.

class neural_compressor.ux.utils.workload.pruning.Criterion(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration Criterion class.

class neural_compressor.ux.utils.workload.pruning.Train(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration Train class.

set_postprocess_transforms(transforms: List[Dict[str, Any]]) None

Set postprocess transformation.

serialize(serialization_type: str = 'default') Dict[str, Any] | List[Dict[str, Any]]

Serialize Pruning class.

class neural_compressor.ux.utils.workload.pruning.WeightCompressionApproach(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration WeightCompressionApproach class.

static initialize_pruners(pruner_dict_list: List[dict | neural_compressor.conf.config.Pruner]) List[neural_compressor.conf.config.Pruner]

Initialize list of pruners from dict format.

serialize(serialization_type: str = 'default') Dict[str, Any] | List[Dict[str, Any]]

Serialize WeightCompressionApproach class.

static serialize_pruner(pruner: neural_compressor.conf.config.Pruner) dict

Serialize INC Pruner instance.

class neural_compressor.ux.utils.workload.pruning.Approach(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration Approach class.

class neural_compressor.ux.utils.workload.pruning.Pruning(data: Dict[str, Any] = {})

Bases: neural_compressor.ux.utils.json_serializer.JsonSerializer

Configuration Pruning class.

neural_compressor.ux.utils.workload.pruning.parse_dict_value_to_float(data: dict, key: str) float | None

Parse value to float or None if value is None.

neural_compressor.ux.utils.workload.pruning.parse_dict_value_to_int(data: dict, key: str) int | None

Parse value to float or None if value is None.