diff --git a/nncf/quantization/algorithms/min_max/torch_backend.py b/nncf/quantization/algorithms/min_max/torch_backend.py index b05825b6bc4..77f9d78163f 100644 --- a/nncf/quantization/algorithms/min_max/torch_backend.py +++ b/nncf/quantization/algorithms/min_max/torch_backend.py @@ -176,18 +176,18 @@ def get_statistic_collector( f"Aggregator type: {params.aggregator_type} is not supported for Torch PTQ backend yet." ) - if params.statistics_type in [StatisticsType.QUANTILE, StatisticsType.ABS_QUANTILE]: + statistic_type = params.statistics_type + if statistic_type in [StatisticsType.QUANTILE, StatisticsType.ABS_QUANTILE]: + # TODO(dlyakhov): merge two quantile aggregators in one if container_key == PTMinMaxTensorStatistic.MIN_STAT: quantile = params.quantile_outlier_prob else: quantile = 1 - params.quantile_outlier_prob - PT_REDUCERS_MAP[statistic_type](reduction_axes=reduction_axes, quantile=[quantile]) - # TODO(dlyakhov): merge two quantile aggregators in one - - statistic_type = params.statistics_type - if collector_params.use_abs_max and statistic_type == StatisticsType.MAX: - statistic_type = StatisticsType.ABS_MAX - reducer = PT_REDUCERS_MAP[statistic_type](reduction_axes=reduction_axes) + reducer = PT_REDUCERS_MAP[statistic_type](reduction_axes=reduction_axes, quantile=[quantile]) + else: + if collector_params.use_abs_max and statistic_type == StatisticsType.MAX: + statistic_type = StatisticsType.ABS_MAX + reducer = PT_REDUCERS_MAP[statistic_type](reduction_axes=reduction_axes) aggregator = AGGREGATORS_MAP[params.aggregator_type]( aggregation_axes=aggregation_axes, diff --git a/tests/openvino/requirements.txt b/tests/openvino/requirements.txt index 07054a24633..5a8cda7f778 100644 --- a/tests/openvino/requirements.txt +++ b/tests/openvino/requirements.txt @@ -2,5 +2,5 @@ pytest virtualenv pytest-cov pytest-mock>=3.3.1 -openvino-dev[onnx,pytorch,tensorflow2]==2023.0.1 +openvino-dev[onnx,pytorch,tensorflow2]==2023.1 fastdownload