nncf.quantization.range_estimator#

Classes#

StatisticsType

Enumeration of different types of statistics that are used to collect per sample

AggregatorType

Enumeration of different types of aggregators that are used to aggregate per sample

StatisticsCollectorParameters

Contains parameters for collecting statistics for activations and weights of the model.

RangeEstimatorParameters

Contains parameters for estimating the range of activations and weights of the model.

class nncf.quantization.range_estimator.StatisticsType[source]#

Bases: enum.Enum

Enumeration of different types of statistics that are used to collect per sample statistics for activations and weights of the model.

Parameters:
  • MAX – The maximum value in a tensor.

  • MIN – The minimum value in a tensor.

  • ABS_MAX – The maximum absolute value in a tensor.

  • QUANTILE – A specific quantile value in a tensor.

  • ABS_QUANTILE – A specific quantile value in the absolute tensor.

  • MEAN – The mean value of a tensor.

class nncf.quantization.range_estimator.AggregatorType[source]#

Bases: enum.Enum

Enumeration of different types of aggregators that are used to aggregate per sample statistics for activations and weights of the model.

Parameters:
  • MEAN – The mean value of a set of tensors.

  • MAX – The maximum value of a set of tensors.

  • MIN – The minimum value of a set of tensors.

  • MEDIAN – The median value of a set of tensors.

  • MEAN_NO_OUTLIERS – The mean value of a set of tensors with outliers removed.

  • MEDIAN_NO_OUTLIERS – The median value of a set of tensors with outliers removed.

class nncf.quantization.range_estimator.StatisticsCollectorParameters[source]#

Contains parameters for collecting statistics for activations and weights of the model.

Parameters:
  • statistics_type (Optional[nncf.quantization.range_estimator.StatisticsType]) – The type of per sample statistics to collect.

  • aggregator_type (Optional[nncf.quantization.range_estimator.AggregatorType]) – The type of aggregator of per sample statistics.

  • clipping_value (Optional[float]) – The value to use for clipping the input tensors before collecting statistics.

  • quantile_outlier_prob (float) – The outlier probability for QUANTILE statistic or MEAN_NO_OUTLIERS/MEDIAN_NO_OUTLIERS aggregators. When using these together, please be aware that currently the quantile value will be applied to both.

class nncf.quantization.range_estimator.RangeEstimatorParameters[source]#

Contains parameters for estimating the range of activations and weights of the model.

Parameters: