Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into dl/torch_experimen…
Browse files Browse the repository at this point in the history
…tal_statistics
  • Loading branch information
daniil-lyakhov committed Sep 22, 2023
2 parents 68dc314 + b95e71c commit 00b4dd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions nncf/quantization/algorithms/min_max/torch_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 00b4dd9

Please sign in to comment.