mltk.core.TfliteQuantization

class TfliteQuantization[source]

Wrapper for tensor quantization

Refer to Quantization Specification for more details.

Properties

n_channels

Number of channels.

quantization_dimension

Quantization dimension

scale

Quantization scalers as list of float values

zeropoint

Quantization zero points as list of integers

Methods

InitFromBuf

InitFromObj

Pack

__init__

__init__(fb_quantization=None)[source]
Parameters:

fb_quantization (QuantizationParametersT) –

property scale: List[float]

Quantization scalers as list of float values

Return type:

List[float]

property zeropoint: List[int]

Quantization zero points as list of integers

Return type:

List[int]

property quantization_dimension: int

Quantization dimension

Return type:

int

property n_channels: int

Number of channels. This is the number of elements in scale and zeropoint

Return type:

int