neural_compressor.data.transforms

Neural Compressor Built-in transforms for multiple framework backends.

Submodules

Package Contents

Classes

TRANSFORMS

Transforms collection class.

BaseTransform

The base class for transform.

ComposeTransform

Composes several transforms together.

ResizeTFTransform

Resize the input image to the given size.

TensorflowResizeWithRatio

Resize image with aspect ratio and pad it to max shape(optional).

RescaleTFTransform

Scale the values of image to [0,1].

NormalizeTFTransform

Normalize a image with mean and standard deviation.

TFSquadV1PostTransform

Postprocess the predictions of bert on SQuAD.

TFSquadV1ModelZooPostTransform

Postprocess the predictions of bert on SQuADV1.1.

ParseDecodeCocoTransform

Coco decoding will be performed automatically from Neural Compressor v1.4.

Postprocess

Just collect the infos to construct a Postprocess.

LabelShift

Convert label to label - label_shift.

BilinearImagenetTransform

Combination of a series of transforms which is applicable to images in Imagenet.

TensorflowResizeCropImagenetTransform

Combination of a series of transforms which is applicable to images in Imagenet.

TensorflowShiftRescale

Label shift by 1 and rescale.

Functions

transform_registry(transform_type, process, framework)

Class decorator used to register all transform subclasses.