neural_compressor.experimental.data.transforms
¶
Neural Compressor Built-in transforms for multiple framework backends.
Submodules¶
Package Contents¶
Classes¶
Transforms collection class. |
|
The base class for transform. |
Functions¶
|
Class decorator used to register all transform subclasses. |
- class neural_compressor.experimental.data.transforms.TRANSFORMS(framework, process)¶
Bases:
object
Transforms collection class.
Provide register method to register new Transforms and provide __getitem__ method to get Transforms according to Transforms type.
- register(name, transform_cls)¶
Register new Transform according to Transforms type.
- Parameters:
name (str) – process name
transform_cls (class) – process function wrapper class
- class neural_compressor.experimental.data.transforms.BaseTransform¶
Bases:
object
The base class for transform.
- neural_compressor.experimental.data.transforms.transform_registry(transform_type, process, framework)¶
Class decorator used to register all transform subclasses.
- Parameters:
transform_type (str) – Transform registration name
process (str) – support 3 process including ‘preprocess’, ‘postprocess’, ‘general’
framework (str) – support 4 framework including ‘tensorflow’, ‘pytorch’, ‘mxnet’, ‘onnxrt’
cls (class) – The class of register.
- Returns:
The class of register.
- Return type:
cls